| View previous topic :: View next topic |
| Author |
Message |
MoralityAcademy Voice
Joined: 27 Feb 2007 Posts: 4
|
Posted: Tue Feb 27, 2007 12:18 am Post subject: Need Help on a Small Change - Bad Channels on WHOIS tcl |
|
|
# chanset <channel> mc.ban_channel.exempt.flags <flags>
# You can set this to exempt users based on there flags from reaction of # this script for the specific channel.
I want to add on the people that have those flags to NOT be whoised at all.
(Currently, on the code below they are whoised but not get kicked.. i want them to NOT be whoised at all).
The stable code is the one you can find through the link below:
(Directly from Carl M. Gregory's (Author) website, located at http://mc.purehype.net)
Thanks in advance to whoever can help me on that...! |
|
| Back to top |
|
 |
Alchera Revered One

Joined: 11 Aug 2003 Posts: 3344 Location: Ballarat Victoria, Australia
|
|
| Back to top |
|
 |
rosc2112 Revered One

Joined: 19 Feb 2006 Posts: 1454 Location: Northeast Pennsylvania
|
Posted: Tue Feb 27, 2007 1:01 am Post subject: |
|
|
MC_8 no longer supports the script. So....Your options are to change the code yourself, or wait for someone to re-write it (in other words, don't hold your breath.) I've been planning to re-write it and simplify it for a while, but since the script works as designed, I've been in no hurry to re-write it.
In any case, you could probably add a small hack in the part where the whois is run. Find the spot in the script where the whois is run and change it to this:
| Code: |
if {![matchattr [nick2hand $nick] $exempt_flags $channel]]} {
putserv "WHOIS $nick"
}
return 1
|
Let me know if that works, I haven't tested it. If it produces an error, post the output of the .set errorInfo command when it encounters an error.
Edit: Hmm, actually, I'll be very surprised if that doesn't break the script completely, since the script looks for the whois response elsewhere. But, maybe it'll work, let us know =) |
|
| Back to top |
|
 |
Sir_Fz Revered One

Joined: 27 Apr 2003 Posts: 3793 Location: Lebanon
|
Posted: Tue Feb 27, 2007 7:27 am Post subject: |
|
|
My suggestion is to add
| Code: | | if {[matchattr [nick2hand $nick] $exempt_flags $channel]} {return 0} |
before putserv "WHOIS $nick" at line 1054. _________________ Follow me on GitHub
- Opposing
Public Tcl scripts |
|
| Back to top |
|
 |
MoralityAcademy Voice
Joined: 27 Feb 2007 Posts: 4
|
Posted: Tue Feb 27, 2007 9:03 am Post subject: |
|
|
| Quote: | [13:39] Last Bind : *
[13:39] Last Commands :
[13:39] 1172579947- mc:banc:list_ scan {nikolakissssssss #channel 0}
[13:39] 1172579947- mc:banc:list_ list #channel
[13:39] 1172579947- mc:banc:list_ has_bans #channel
[13:39] 1172579947- mc:banc:join_ nikolakissssssss ~nikolakis@ppp149-84.adsl.forthnet.gr * #channel
[13:39] 1172579947- mc:banc:join_ nikolakissssssss ~nikolakis@ppp149-84.adsl.forthnet.gr * #hellas
[13:39] Error stack :
[13:39] syntax error in expression "![matchattr [nick2hand $nick] $exempt_flags $channel]]": extra tokens at end of expression
[13:39] ("if" test expression)
[13:39] while compiling
[13:39] "if {![matchattr [nick2hand $nick] $exempt_flags $channel]]} {
[13:39] putserv "WHOIS $nick"
[13:39] }"
[13:39] ("scan" arm line 43)
[13:39] invoked from within
[13:39] "switch -- $command {
[13:39]
[13:39] "has_dcc_access" {
[13:39] foreach {handle channel type} $args break
[13:39]
[13:39] if {$mc_banc(:config:access:$type) == "-|-"} {retu..."
[13:39] (procedure "mc:banc:list_" line 5)
[13:39] invoked from within
[13:39] "mc:banc:list_ scan {nikolakissssssss #channel 0}"
[13:39] ("eval" body line 1)
[13:39] invoked from within
[13:39] "eval $command $args"
[13:39] -------------- |
This was the error output.. :/
Well can you try to make the change on the original, test it and post it here?
I tryied myself but failed, then tryied to add another exception list with nicknames itself but that failed too..
The problem is that this tcl is used in a channel with many IRCops that they get noticed and if you set the rescan interval to be done in every 5 minutes it's very annoying...
that's why i need this :/
Thanks in advance..
Last edited by MoralityAcademy on Tue Feb 27, 2007 3:07 pm; edited 3 times in total |
|
| Back to top |
|
 |
Alchera Revered One

Joined: 11 Aug 2003 Posts: 3344 Location: Ballarat Victoria, Australia
|
Posted: Tue Feb 27, 2007 10:10 am Post subject: |
|
|
| Sir_Fz wrote: | My suggestion is to add
| Code: | | if {[matchattr [nick2hand $nick] $exempt_flags $channel]} {return 0} |
before putserv "WHOIS $nick" at line 1054. |
Look at Sir_Fz' code carefully. _________________ Add [SOLVED] to the thread title if your issue has been.
Search | FAQ | RTM |
|
| Back to top |
|
 |
MoralityAcademy Voice
Joined: 27 Feb 2007 Posts: 4
|
Posted: Tue Feb 27, 2007 10:22 am Post subject: |
|
|
| Alchera wrote: | | Sir_Fz wrote: | My suggestion is to add
| Code: | | if {[matchattr [nick2hand $nick] $exempt_flags $channel]} {return 0} |
before putserv "WHOIS $nick" at line 1054. |
Look at Sir_Fz' code carefully. |
The same.. error..
| Quote: | [15:22] Last Bind : *
[15:22] Last Commands :
[15:22] 1172586134- mc:banc:list_ list #channel
[15:22] 1172586134- mc:banc:list_ has_bans #channel
[15:22] 1172586134- mc:banc:list_ scan {PERIERGOS #channel 0}
[15:22] 1172586134- mc:banc:list_ list #channel
[15:22] 1172586134- mc:banc:list_ has_bans #channel
[15:22] Error stack :
[15:22] can't read "exempt_flags": no such variable
[15:22] while executing
[15:22] "matchattr [nick2hand $nick] $exempt_flags $channel"
[15:22] ("foreach" body line 5)
[15:22] invoked from within
[15:22] "foreach utimer $utimers {
[15:22] if {[lsearch -glob $utimer [list mc:banc:list scan $nick *]] == "1"} {
[15:22] killutimer [lindex $utimer 2]
[15:22] ..."
[15:22] ("scan" arm line 39)
[15:22] invoked from within
[15:22] "switch -- $command {
[15:22]
[15:22] "has_dcc_access" {
[15:22] foreach {handle channel type} $args break
[15:22]
[15:22] if {$mc_banc(:config:access:$type) == "-|-"} {retu..."
[15:22] (procedure "mc:banc:list_" line 5)
[15:22] invoked from within
[15:22] "mc:banc:list_ scan {PERIERGOS #channel 0}"
[15:22] ("eval" body line 1)
[15:22] invoked from within
[15:22] "eval $command $args" |
Last edited by MoralityAcademy on Tue Feb 27, 2007 3:10 pm; edited 1 time in total |
|
| Back to top |
|
 |
Sir_Fz Revered One

Joined: 27 Apr 2003 Posts: 3793 Location: Lebanon
|
Posted: Tue Feb 27, 2007 2:27 pm Post subject: |
|
|
replace $exempt_flags with [channel get $channel mc.ban_channel.exempt.flags] _________________ Follow me on GitHub
- Opposing
Public Tcl scripts |
|
| Back to top |
|
 |
MoralityAcademy Voice
Joined: 27 Feb 2007 Posts: 4
|
Posted: Tue Feb 27, 2007 3:03 pm Post subject: |
|
|
| Sir_Fz wrote: | | replace $exempt_flags with [channel get $channel mc.ban_channel.exempt.flags] |
Not really sure yet (i ll have to test it later) but it runs on this way without getting errors...
I'll notify you for sure as soon as i ve check it
Thank you guys..!  |
|
| Back to top |
|
 |
rosc2112 Revered One

Joined: 19 Feb 2006 Posts: 1454 Location: Northeast Pennsylvania
|
Posted: Tue Feb 27, 2007 4:39 pm Post subject: |
|
|
Mine had an extra ] at the end, remove that. And as far as ircops, too bad for them, they get banned from my channels
If the exempt_flags variable is still throwing errors, use $::exempt_flags (its causing an error because the proc doesn't have exempt_flags as a global var at the top. You can fix it by either adding exempt_flags to the global flags in the proc, or use $::exempt_flags)
Edit: Just saw sir_fz's fix, that'll work too =)
Edit2: I have no way to test any such changes, as I do not have ircops, and therefore cannot see when the script whois's me (just 1 more reason to despise ircops, they have no reason to need to see whois, they're just being nosey and elitist </opinion> )
I could theoretically set up ircd to test things, but, 1) I'm lazy and 2) I despise ircops and don't care if they don't like being whois'd.. Stay off my channels and you won't be annoyed by it  |
|
| Back to top |
|
 |
Alchera Revered One

Joined: 11 Aug 2003 Posts: 3344 Location: Ballarat Victoria, Australia
|
Posted: Tue Feb 27, 2007 6:35 pm Post subject: |
|
|
This IRCOp "thing" is interesting. We're not being "being nosey and elitist" either.
The whois is dependent on which bloated IRCd is being used. We also find it annoying. For some, a scripting solution solves the "problem".
| Quote: | | [00:53] [09:27] *** Notice -- /WHOIS command used on you by: LeReveur (~merci@laddertest.com) |
_________________ Add [SOLVED] to the thread title if your issue has been.
Search | FAQ | RTM |
|
| Back to top |
|
 |
|