ive always used mIRC scripting and don't know how to TCL script for an EGGDROP... i want to make an away script that works for IRCops if the user is in a +O(IRCops Only) channel called #staff and they type !away they will be automatically DEOP'd VOICED in the channels below and when they type !back they are OP'd DEVOICED in these channels...
the channels are... #rp #emma-watson.net #fun #help #bots #trivia #hctrivia and #housecup
First, you can bind to a pub trigger !away. Then make the bot check if it is on #staff by checking [channels], then do [getchanmode $chan] and check if "O" (same case) is in the channel set mode and check if [string equal -nocase "#staff" $chan] for the trigger. Then use a foreach loop for [channels] and using pushmode make it deop/devoice itself on all channels, using /samode for devoicing especially or whatever.
Alternatively you can first make it check if it is opped/voiced on any channel before deoping/voicing it as well so it doesn't uselessly deop/voice itself as modes can be removed even if they are not placed.
Similarly for !back you can use this vice versa, you just need to change the trigger name and the "+" to a "-" sign for deop and devoice.
·awyeah·
==================================
Facebook: jawad@idsia.ch (Jay Dee) PS: Guys, I don't accept script helps or requests personally anymore.
==================================