I readed the documentation of the TCL... it's hard, anyhere the problem is still there...
How can I invite a person oping on #a to channel #b ? And moreover, if this person is already on #b, then do not invite her ? It is possible please show me :/
Zariffa wrote:How can I invite a person oping on #a to channel #b ? And moreover, if this person is already on #b, then do not invite her ? It is possible please show me :/
bind mode - "#a +o" the_proc
Then in the proc use 'onchan $victim #b' to determine if they're already on the channel, if not; 'putserv' the INVITE. (the eggdrop commands 'bind', 'onchan' and 'putserv' are described in doc/tcl-commands.doc)
It's very cool up to you, showing me the manipulations to do, but I don't know either how to begin (I don't want to, and I don't have time to learn TCL), could you just show me what it would be ?
bind mode - * op:invite
proc op:invite {nick uhost hand chan mode victim } {
global bot botnick
if {$mode=="+o" && $chan=="#a" && $victim!="KBS" && $victim!="IriX"} {
if [isop $victim #b] {
putserv "privmsg #b :4$victim vient de s'oper sur #a"
} else {
putserv "privmsg #b :4$victim vient de s'oper sur #a sans etre present sur le salon des op !"
putserv "invite $victim #b"
return 0
}
}
if {$mode=="+o" && $chan=="#a" && $victim=="KBS" } {
putserv "privmsg #b :4Je Viens De M'oper sur #a"
}
if {$mode=="+o" && $chan=="#a" && $victim=="IriX" } {
putserv "privmsg #b :4Irix a encore planté :("
}
}