mIRC Home    About    Download    Register    News    Help

Print Thread
Joined: Mar 2008
Posts: 6
P
pilsken Offline OP
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
P
Joined: Mar 2008
Posts: 6
Hello lads, im working on some simple bot commands, here is what i got so far..

Code:
;ON OWNER.

on owner:TEXT:`addowner*:#:{ guser owner $2 | notice $2 4,0You have been added as botowner. Type `commands for further information. }
on owner:TEXT:`addmaster*:#:{ guser master $2 | notice $2 4,0You have been added as botmaster. Type `commands for furhter information. }
on owner:TEXT:`join*:#:{ join $2 | notice $nick 4,0Joined $2 $+ . }
on owner:TEXT:`part*:#:{ part $2 | notice $nick 4,0Parted $2 $+ . }
on owner:TEXT:`nick*:#:{ nick $2 | notice $nick 4,0Changed nick to $2 $+ . }
on owner:TEXT:`hop:#:{ hop | notice $nick 4,0Rejoined channel. }
on owner:TEXT:`invite:#:{ load -rs invite.mrc | notice $nick 4,0Invite.mrc loaded successfully. }
on owner:TEXT:`quit:#:{ quit 4,0Quit performed by: $nick $+ . }
on owner:TEXT:`ban*:#:{ mode $chan +b $address($2,1) | kick $chan $2 4,0Kick performed by: $nick $+ . }
on owner:TEXT:`kick*:#:{ kick $chan $2 4,0Kick performed by $nick $+ . }
on owner:TEXT:`op*:#:{ mode $chan +o $2 }
on owner:TEXT:`deop*:#:{ mode $chan -o $2 }
on owner:TEXT:`voice*:#:{ mode $chan +v $2 }
on owner:TEXT:`devoice*:#:{ mode $chan -v $2 }

;ON MASTER.

on master:TEXT:`op*:#:{ mode $chan +o $nick }
on master:TEXT:`deop*:#:{ mode $chan -o $nick }
on master:TEXT:`voice*:#:{ mode $chan +v $nick }
on master:TEXT:`devoice*:#:{ mode $chan -v $nick }
on master:TEXT:`kick*:#:{ kick $chan $2 4,0Kick performed by $nick $+ . }

;ON ANYONE..

on *:TEXT:`love*:#:{ msg $chan 4,0There is a $rand(0,100) $+ % chance that $nick and $2 will get married. }
on *:TEXT:^-AIMBOT-^:#:{ msg $chan Hello $nick $+ . Wazzup? :) }


I want to know if i can do something like this,

Code:
on *:BAN:#:{ 
if ($nick == owner) {
halt | return
}
else {
mode $chan +b $address($nick,2) 
kick $chan $nick You have to be a botowner to perform this command.
}
}


How can i make this happen? I want it to check if the user is in the list of owners, and if he is, let he ban all he wants, but if not, ban him...

Please help me,

Best regards.

Joined: Dec 2002
Posts: 2,031
R
Hoopy frood
Offline
Hoopy frood
R
Joined: Dec 2002
Posts: 2,031

You could make two BAN events...

Code:

on owner:BAN:#:return

on @!*:BAN:#: {
  mode $chan +b $address($nick,2) 
  kick $chan $nick You have to be a botowner to perform this command.
}


Joined: Sep 2005
Posts: 2,881
H
Hoopy frood
Offline
Hoopy frood
H
Joined: Sep 2005
Posts: 2,881
Code:
on @!*:BAN:#:{ 
  if ($ulevel != owner) ban -k $chan $nick 2 You have to be a botowner to perform this command.
}

Joined: Oct 2004
Posts: 8,330
Hoopy frood
Offline
Hoopy frood
Joined: Oct 2004
Posts: 8,330
Just as a note, putting HALT and RETURN into the same IF is not only redundant, but the second one will never even execute. In most situations, you want to use RETURN to stop your script. HALT should be used mainly to prevent things from happening that aren't really part of your script, such as your "real" text appearing in an on INPUT event.


Invision Support
#Invision on irc.irchighway.net

Link Copied to Clipboard