Very simple indeed.
Try this code you can alter it according to your needs if you need to op, deop, voice, devoice, kick, ban someone or need to change modes, topics etc on a channel.
Code: Select all
## You can change the flag triggers according to your needs
bind pub n !deop pub:deop
# And here is the procedure to deop the nick(s)
proc pub:deop {nick host hand chan text} {
global botnick
if {[botisop $chan] && [onchan $nick $chan]} {
set nick1 [lindex $text 0]; set nick2 [lindex $text 1]
set nick3 [lindex $text 2]; set nick4 [lindex $text 3]
set nick5 [lindex $text 4]; set nick6 [lindex $text 5]
putquick "MODE $chan -oooooo $nick1 $nick2 $nick3 $nick4 $nick5 $nick6"
}
}
This will trigger on any public channel, only if bot owners with the flag 'n' send the command.
It can utilize multiple nicks.
If you want to say deop more than 1 nick without causing a flood
rather than deoping one by one, you can deop more than one.
Mostly all ircds allow atleast 6 mode changes so you can utilize like this:
Code: Select all
!deop <nick1> <nick2> <nick3> .......... <nick6>
Even if you dont want to deop 6 people, if you want to deop less than 6 people, just supply their nicks one by one after the trigger and it will still carry out its procedure and deop the nicks listed.