| View previous topic :: View next topic |
| Author |
Message |
Cr0ntab Voice
Joined: 26 Mar 2010 Posts: 22
|
Posted: Thu Sep 30, 2010 3:34 pm Post subject: custom flag |
|
|
Hello i want a tcl(i believe it is an easy one).
i want the bot to give auto mode +a on the users that have +A flag.like it gives +v on +g users.(affected by chanset aop-delay).
for example if i have global +A i want the bot when it can to give me +a channel mode on join like the +v with +g flag and +o with +a flag |
|
| Back to top |
|
 |
willyw Revered One
Joined: 15 Jan 2009 Posts: 1175
|
Posted: Thu Sep 30, 2010 8:11 pm Post subject: |
|
|
| Code: |
bind join - "% *" giveSOP
proc giveSOP {nick uhost handle chan} {
if {[matchattr $handle A]} {
putserv "mode $chan +a $nick"
}
}
|
This method of auto-awarding +a is not secure, as the bot is watching the users hostmask.
I think that if you want certain users, with certain flags, to be able to get +a, then it would be better for these users to have to identify themselves with a password.
On the one network I tried the above script on, I could not fully test it.
This was because the bot was not the channel owner, and only the channel owner can award +a there.
I could see that the bot did try to award +a though, and was denied. |
|
| Back to top |
|
 |
willyw Revered One
Joined: 15 Jan 2009 Posts: 1175
|
Posted: Thu Sep 30, 2010 8:42 pm Post subject: |
|
|
With something like this script below, your users that you set +A, could send a /msg to the bot, using their password, and the bot would award them +a (if the server allows it)
| Code: |
# Tell the user to send:
# /msg <botnick> #channel <password_here>
# ( User must have +A, else script will not award +a)
#
# Example:
# /msg AnyBot #chittychat xyz123abc
#
bind msg - "!sop" SOPviamsg
proc SOPviamsg {nick uhost handle text} {
global botnick
set chan [lindex [split $text] 0]
if {![botonchan $chan]} {
putserv "privmsg $nick :$botnick is not on channel $chan"
return 0
}
if {[passwdok $handle [lindex [split $text] 1]] && [matchattr $handle A]} {
putserv "mode $chan +a $nick"
} else {
putserv "privmsg $nick :Syntax: /msg $botnick #channel <password_here> "
}
}
|
Again, this could not be fully tested, as the bot was not the channel owner in the test channel I used. |
|
| Back to top |
|
 |
|