| View previous topic :: View next topic |
| Author |
Message |
Kraka Voice
Joined: 21 Apr 2005 Posts: 19
|
Posted: Mon Sep 15, 2008 8:46 pm Post subject: relay mode change and kick error |
|
|
I got the relay script all set up and i can see what is going on in the chan, but when a mode change, or a kick happens i get a error in the script and it will not relay it. the error that i get is:
wrong # args: should be "send_mode nick uhost hand chan mchg" while executing "send_mode $_kick1 $_kick2 $_kick3 $_kick4 $_kick5 $_kick6"
not to sure if anyone can help, but would appreciate it
| Code: |
proc send_across {cmd chan nick text} {
global server channelList server1List server2List
if {[lsearch $channelList [string tolower $chan]] != -1} {
if {[string first [lindex $server1List 0] $server] != -1} {
set fromServer "[lindex $server1List 1]"
set toBot "[lindex $server1List 2]"
} else {
set fromServer "[lindex $server2List 1]"
set toBot "[lindex $server2List 2]"
}
set botMsg [concat $cmd $chan $fromServer $nick $text]
putbot $toBot $botMsg
}
}
# Find out who's on the other network channel
proc send_xnames {nick uhost hand arg} {
if {$arg == "" || [string first "#" $arg] != 0} {
putserv "NOTICE $nick :Usage\: /msg Eros xnames #channel"
} else {
if {[onchan $nick $arg]} {
send_across "names" $arg $nick "dummy"
} else {
putserv "NOTICE $nick :I'm sorry, you must be in channel $arg to do a remote names (xnames) command"
}
}
}
bind msg - xnames send_xnames
proc relay_xnames {frm_bot command arg} {
set startingChanlist "[chanlist [lindex $arg 0]]"
foreach mem $startingChanlist {
if {[isop $mem [lindex $arg 0]]} {
lappend finalChanlist \@$mem
} elseif {[isvoice $mem [lindex $arg 0]]} {
lappend finalChanlist \+$mem
} else {
lappend finalChanlist $mem
}
}
send_across "rnames" [lindex $arg 0] [lindex $arg 2] $finalChanlist
}
bind bot - names relay_xnames
proc recv_xnames {frm_bot command arg} {
putserv "NOTICE [lindex $arg 2] :The following people are on channel [lindex $arg 0] on net [lindex $arg 1] : [lrange $arg 3 end]"
}
bind bot - rnames recv_xnames
proc send_nick {nick uhost hand chan newnick} {
send_across "nick" $chan $nick $newnick
}
bind nick - * send_nick
proc recv_nick {frm_bot command arg} {
putserv "PRIVMSG [lindex $arg 0] :\[[lindex $arg 1]\] *** [lindex $arg 2] is now known as [lrange $arg 3 end]"
}
bind bot - nick recv_nick
proc send_mode {nick uhost hand chan mchg} {
if {[string first "b" [lindex $mchg 0]] != -1} {
send_across "ban" $chan $nick $mchg
}
}
bind mode - * send_mode
# Multiple recv's from one send
proc recv_ban {frm_bot command arg} {
putserv "MODE [lindex $arg 0] [lrange $arg 3 end]"
}
bind bot - ban recv_ban
proc send_sign {nick uhost hand chan reason} {
send_across "sign" $chan $nick $reason
}
proc recv_sign {frm_bot command arg} {
putserv "PRIVMSG [lindex $arg 0] :\[[lindex $arg 1]\] *** [lindex $arg 2] Quit \([lrange $arg 3 end]\)"
}
bind bot - sign recv_sign
proc send_pubm {nick uhost hand chan text} {
set cmd "pubm"
send_across $cmd $chan $nick $text
}
bind pubm - * send_pubm
proc recv_pubm {frm_bot command arg} {
putserv "PRIVMSG [lindex $arg 0] :\[[lindex $arg 1]\] \<[lindex $arg 2]\> [lrange $arg 3 end]"
}
bind bot - pubm recv_pubm
proc send_action {nick uhost hand chan keyw text} {
send_across "act" $chan $nick $text
}
bind ctcp - "ACTION" send_action
proc recv_action {frm_bot command arg} {
putserv "PRIVMSG [lindex $arg 0] :\[[lindex $arg 1]\] \* [lindex $arg 2] [lrange $arg 3 end]"
}
bind bot - act recv_action
proc send_join {nick uhost hand chan} {
send_across "join" $chan $nick\($uhost\) "dummy"
send_across "names" $chan $nick "dummy"
}
bind join - * send_join
proc recv_join {frm_bot command arg} {
putserv "PRIVMSG [lindex $arg 0] :\[[lindex $arg 1]\] \*** [lindex $arg 2] has joined channel [lindex $arg 0]"
}
bind bot - join recv_join
proc send_part {nick uhost hand chan} {
send_across "part" $chan $nick ""
}
bind part - * send_part
proc recv_part {frm_bot command arg} {
putserv "PRIVMSG [lindex $arg 0] :\[[lindex $arg 1]\] \*** [lindex $arg 2] has left channel [lindex $arg 0]"
}
bind bot - part recv_part
putlog "relay 1.0.0 by: cl00bie <cl00bie@sorcery.net>" |
|
|
| Back to top |
|
 |
speechles Revered One

Joined: 26 Aug 2006 Posts: 1398 Location: emerald triangle, california (coastal redwoods)
|
Posted: Mon Sep 15, 2008 9:52 pm Post subject: |
|
|
| Code: | proc send_mode {nick uhost hand chan mchg victim} {
if {[string first "b" [lindex $mchg 0]] != -1} {
send_across "ban" $chan $nick "$mchg $victim"
}
} |
Your tcl version expects a 6th argument used when you bind to mode changes. Mode-change is 5th and the new one, victim, your 6th. This is all you need. Combine the 5th and 6th arguments when calling send_across so the rest of the script can see these together as it expects. Your tcl version is too new for the old mode arrangement this script had. _________________ speechles' eggdrop tcl archive |
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|