| View previous topic :: View next topic |
| Author |
Message |
Nor7on Op

Joined: 03 Mar 2007 Posts: 185 Location: Spain - Barcelona
|
Posted: Mon Dec 03, 2007 7:38 pm Post subject: unban via X and banlist. |
|
|
i trying run this script, but i get error.
the script
| Code: |
bind pub o|o .ub pub:unban
proc pub:unban { nick uhost hand chan text } {
global botnick drchan drreason opsc tnick
if {[botisop $drchan]} {
if {[string length $text] > 0} {
set tnick [lindex $text 0]
if {[ischanban $tnick $drchan]} {
killchanban $drchan $tnick
putserv "MODE $drchan -b $tnick"
putquick "privmsg X :unban $drchan $tnick"
putserv "privmsg $opsc :$hand/$nick: I removed \002$tnick\002 from $drchan" }
if {[isban $drchan $tnick]} {
killban $tnick
} else { puthelp "NOTICE $nick : I can't see that ban in the channel list" }
} else { puthelp "NOTICE $nick :SYNTAX: .ub <nick!user@host> - unbans an address" }
} else { puthelp "NOTICE $nick :Pfff n-am op!" }
}
|
and get this error.
<)Modo> [17:36] Tcl error [pub:unban]: can't read "drchan": no such variable
errorInfo:
| Code: |
<Nor7on> .set errorInfo
<)Modo> Currently: can't read "drchan": no such variable
<)Modo> Currently: while executing
<)Modo> Currently: "botisop $drchan"
<)Modo> Currently: (procedure "pub:unban" line 3)
<)Modo> Currently: invoked from within
<)Modo> Currently: "pub:unban $_pub1 $_pub2 $_pub3 $_pub4 $_pub5"
|
|
|
| Back to top |
|
 |
Alchera Revered One

Joined: 11 Aug 2003 Posts: 3344 Location: Ballarat Victoria, Australia
|
Posted: Mon Dec 03, 2007 8:01 pm Post subject: |
|
|
That is not the full code.
"drchan" is not defined. _________________ Add [SOLVED] to the thread title if your issue has been.
Search | FAQ | RTM |
|
| Back to top |
|
 |
Nor7on Op

Joined: 03 Mar 2007 Posts: 185 Location: Spain - Barcelona
|
Posted: Mon Dec 03, 2007 9:44 pm Post subject: |
|
|
ohhh ;(
i want a script for unban in the internal banlist and too via X. |
|
| Back to top |
|
 |
Nor7on Op

Joined: 03 Mar 2007 Posts: 185 Location: Spain - Barcelona
|
Posted: Mon Dec 03, 2007 9:49 pm Post subject: |
|
|
or how fix this ( lol.tcl 8.0 ) for unban with X too.
| Code: |
proc lol_unban { nick hand chan mask byX } {
if {[isnumber $mask]} {
set find 0
foreach bans [banlist $chan] {
incr find
if {$find == $mask} { set mask [lindex $bans 0] ; break }
}
if {[isnumber $mask]} {
puthelp "NOTICE $nick :[lang_text lol_lang_data [getlang $hand] 46 $mask]"
return 0
}
} else {
if {[string first "!" $mask] == -1 && [string first "@" $mask] == -1} {
if {[isnumber [string index $mask 0]]} {
set mask *!*@$mask
} else {
set mask $mask*!*@*
}
}
if {[string first "!" $mask] == -1} {set mask *!*$mask}
if {[string first "@" $mask] == -1} {set mask $mask*@*}
}
if {$byX } {
if {[channel get $chan xlogin] && [channel get $chan protectX] && [isop X $chan]} {
putserv "PRIVMSG X :unban $chan $mask"
puthelp "NOTICE $nick :[lang_text lol_lang_data [getlang $hand] 47 "$mask $chan"]"
return 0
}
}
if {[isban $mask $chan]} {
if {![killchanban $chan $mask]} { killban $mask }
puthelp "NOTICE $nick :[lang_text lol_lang_data [getlang $hand] 47 "$mask $chan"]"
return 0
}
if {[ischanban $mask $chan] && [botisop $chan]} {
putserv "MODE $chan -b $mask"
putserv "PRIVMSG X :unban $chan $mask"
puthelp "NOTICE $nick :[lang_text lol_lang_data [getlang $hand] 47 "$mask $chan"]"
return 0
}
puthelp "NOTICE $nick :[lang_text lol_lang_data [getlang $hand] 48 $chan]"
return 0
}
|
i add this:
putserv "PRIVMSG X :unban $chan $mask"
but, unban channelban, but no unban via X. |
|
| Back to top |
|
 |
Alchera Revered One

Joined: 11 Aug 2003 Posts: 3344 Location: Ballarat Victoria, Australia
|
Posted: Mon Dec 03, 2007 10:46 pm Post subject: |
|
|
You're making a very lame attempt at grabbing pieces of other's code without a clue as to what you're doing and then expecting other's to assist (which won't happen).
LoL's TooLz is defunct (probably the same goes for that ripped code in your first post).
Either learn Tcl and code something yourself, search the Tcl Archive for what you need OR post an appropriate request of your needs in the Script Requests forum.
In your xbanpurge.tcl error post you were given a solution to fix that script. You (apparently) ignored that advice, hence your creation of a new thread here.
There is a certain amount of self-help required by users of these forums. Those that desire to help expect those helped to do some figuring out themselves as part of their learning curve.
If something is unclear you simply ask and all will (usually) be revealed.  _________________ Add [SOLVED] to the thread title if your issue has been.
Search | FAQ | RTM |
|
| Back to top |
|
 |
iamdeath Master

Joined: 11 Feb 2005 Posts: 323 Location: *HeLL*
|
Posted: Wed Dec 05, 2007 12:09 am Post subject: Re: unban via X and banlist. |
|
|
| Nor7on wrote: | i trying run this script, but i get error.
the script
| Code: |
bind pub o|o .ub pub:unban
proc pub:unban { nick uhost hand chan text } {
global botnick drchan drreason opsc tnick
if {[botisop $drchan]} {
if {[string length $text] > 0} {
set tnick [lindex $text 0]
if {[ischanban $tnick $drchan]} {
killchanban $drchan $tnick
putserv "MODE $drchan -b $tnick"
putquick "privmsg X :unban $drchan $tnick"
putserv "privmsg $opsc :$hand/$nick: I removed \002$tnick\002 from $drchan" }
if {[isban $drchan $tnick]} {
killban $tnick
} else { puthelp "NOTICE $nick : I can't see that ban in the channel list" }
} else { puthelp "NOTICE $nick :SYNTAX: .ub <nick!user@host> - unbans an address" }
} else { puthelp "NOTICE $nick :Pfff n-am op!" }
}
|
and get this error.
<)Modo> [17:36] Tcl error [pub:unban]: can't read "drchan": no such variable
errorInfo:
| Code: |
<Nor7on> .set errorInfo
<)Modo> Currently: can't read "drchan": no such variable
<)Modo> Currently: while executing
<)Modo> Currently: "botisop $drchan"
<)Modo> Currently: (procedure "pub:unban" line 3)
<)Modo> Currently: invoked from within
<)Modo> Currently: "pub:unban $_pub1 $_pub2 $_pub3 $_pub4 $_pub5"
|
|
try adding this line at the beginning of this code then restart.
| Code: | | set drchan "#mychannel" |
_________________ |AmDeAtH @ Undernet
Death is only the *Beginning*... |
|
| Back to top |
|
 |
Nor7on Op

Joined: 03 Mar 2007 Posts: 185 Location: Spain - Barcelona
|
Posted: Wed Dec 05, 2007 4:03 pm Post subject: |
|
|
its good, unban in the channel, chanban, and via X. but get this error.
| Code: |
<Nor7on> .set errorInfo
<)Modo> Currently: invalid channel: *!*@*.ar
<)Modo> Currently: while executing
<)Modo> Currently: "isban $drchan $tnick"
<)Modo> Currently: (procedure "pub:unban" line 11)
<)Modo> Currently: invoked from within
<)Modo> Currently: "pub:unban $_pub1 $_pub2 $_pub3 $_pub4 $_pub5"
|
and how can do for run this script in all channels? |
|
| Back to top |
|
 |
iamdeath Master

Joined: 11 Feb 2005 Posts: 323 Location: *HeLL*
|
Posted: Thu Dec 06, 2007 11:16 am Post subject: |
|
|
It's simple remove $drchan and replace it with $chan _________________ |AmDeAtH @ Undernet
Death is only the *Beginning*... |
|
| Back to top |
|
 |
|