This is the new home of the egghelp.org community forum.
All data has been migrated (including user logins/passwords) to a new phpBB version.


For more information, see this announcement post. Click the X in the top right-corner of this box to dismiss this message.

Tcl de-op or de-voice

Old posts that have not been replied to for several years.
Locked
s
scorchin
Voice
Posts: 13
Joined: Mon Jun 07, 2004 5:28 am

Tcl de-op or de-voice

Post by scorchin »

Hi i want to make a tcl script that will !deop username and !devoice someone, then the same script can be used to !op or !voice someone. cheers.
User avatar
awyeah
Revered One
Posts: 1580
Joined: Mon Apr 26, 2004 2:37 am
Location: Switzerland
Contact:

Post by awyeah »

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.
·­awyeah·

==================================
Facebook: jawad@idsia.ch (Jay Dee)
PS: Guys, I don't accept script helps or requests personally anymore.
==================================
Locked