Invite script ( add dont work )

Paste Your code(s) here, and state your problem.

Invite script ( add dont work )

Postby Futz0r » Sun Sep 20, 2009 8:22 am

I want to make a script where I can add people from the outside, as the bot does not know. but how do I make it permanent?

So, what I want in to help me with is to add functionality to work on my channel. let us say "!invite add chicken" and the chicken is not on the channel - then it goes into itself and "find" data on chicken


Code: Select all
on *:JOIN:#Futz0r.dk: {
  var %hostname = $address($nick,2)
  if (!$readini(userlist.ini,$chan,%hostname) && %adminscan == on) {
    .ban -u300 $chan %hostname
    .kick $chan $nick Invite only channel ( $+ $kc $+ ) | msg $nick %logo You have been kicked from #Futz0r.dk , if you want an invite: so ask Futz0r and wait for invite approval %logo
  }
}

on *:TEXT:!invite*:#Futz0r.dk: {
  if (!$2) { notice $nick %logo Syntax: $1 on/off/status/add/del/list %logo }
  elseif ($2 == on) {
    if (%adminscan == on) { notice $nick %logo Only-invite is already enabled. %logo }
    else { set %adminscan on | notice $nick %logo Only-invite is now enabled. %logo }
  }
  elseif ($2 == off) {
    if (%adminscan == off) { notice $nick %logo Only-invite is already disabled. %logo }
    else { set %adminscan off | notice $nick %logo Only-invite is now disabled. %logo }
  }
  elseif ($2 == status) {
    if (%adminscan == on) { notice $nick %logo Only-invite is currently: Enabled %logo }
    else { notice $nick %logo Only-invite is currently: Disabled %logo }
  }
  elseif ($2 == add) {
    if (!$3) { notice $nick Syntax: $1 $2 <nick> }
    if  ($readini(userlist.ini,$chan,$address($3,2)) == INVITE) { notice $nick %logo $3 is already an the INVITE list. %logo }
    else { writeini userlist.ini $chan $address($3,2) INVITE | notice $nick %logo Done. Added $3 to Only-invite list. %logo }
  }
  elseif ($2 == del) {
    if (!$3) { notice $nick Syntax: $1 $2 <nick|hostname> }
    var %adminhost = $address($3,2)
    if (*!*@* iswm $3) && ($left($3,4) == *!*@) { var %adminhost = $3 }
    if  (!$readini(userlist.ini,$chan,%adminhost)) { notice $nick %logo %adminhost is not in Only-invite list. %logo }
    else { remini userlist.ini $chan %adminhost | notice $nick %logo Done. Removed %adminhost from Only-invite list. %logo }
  }
  elseif ($2 == list) {
    notice $nick %logo Only-invite admins - Entries: $iif($ini(userlist.ini,$chan,0),$v1,0 %logo )
    var %i = 1
    while (%i <= $ini(userlist.ini,$chan,0)) {
      var %x = $ini(userlist.ini,$chan,%i)
      var %lvl = $readini(userlist.ini,$chan,%i)
      var %list = $addtok( $+ %x  $+ $chr(44),%list,32)
      inc %i
      notice $nick %x
    }
    else { halt }
  }
}

alias kc {
  if (!%kicks) { set %kicks 0 }
  inc %kicks
  return %kicks
}
Futz0r
 

Re: Invite script ( add dont work )

Postby Patty » Tue Nov 24, 2009 5:46 pm

You will simply /whois the nick,

and the RAW *:* can help you do what ever you want as long as the person is ONLINE on IRC
Patty
 


Return to Mirc Scripting Help

Who is online

Users browsing this forum: No registered users and 0 guests

cron