This is the new home of the egghelp.org community forum.
All data has been migrated (including user logins/passwords) to a new phpBB version.


For more information, see this announcement post. Click the X in the top right-corner of this box to dismiss this message.

Need Help on a Small Change - Bad Channels on WHOIS tcl

Support & discussion of released scripts, and announcements of new releases.
Post Reply
M
MoralityAcademy
Voice
Posts: 4
Joined: Tue Feb 27, 2007 12:11 am

Need Help on a Small Change - Bad Channels on WHOIS tcl

Post by MoralityAcademy »

# 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...!
User avatar
Alchera
Revered One
Posts: 3344
Joined: Mon Aug 11, 2003 12:42 pm
Location: Ballarat Victoria, Australia
Contact:

Post by Alchera »

Add [SOLVED] to the thread title if your issue has been.
Search | FAQ | RTM
User avatar
rosc2112
Revered One
Posts: 1454
Joined: Sun Feb 19, 2006 8:36 pm
Location: Northeast Pennsylvania

Post by rosc2112 »

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: Select all

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 =)
User avatar
Sir_Fz
Revered One
Posts: 3794
Joined: Sun Apr 27, 2003 3:10 pm
Location: Lebanon
Contact:

Post by Sir_Fz »

My suggestion is to add

Code: Select all

if {[matchattr [nick2hand $nick] $exempt_flags $channel]} {return 0}
before putserv "WHOIS $nick" at line 1054.
M
MoralityAcademy
Voice
Posts: 4
Joined: Tue Feb 27, 2007 12:11 am

Post by MoralityAcademy »

[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.
User avatar
Alchera
Revered One
Posts: 3344
Joined: Mon Aug 11, 2003 12:42 pm
Location: Ballarat Victoria, Australia
Contact:

Post by Alchera »

Sir_Fz wrote:My suggestion is to add

Code: Select all

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
M
MoralityAcademy
Voice
Posts: 4
Joined: Tue Feb 27, 2007 12:11 am

Post by MoralityAcademy »

Alchera wrote:
Sir_Fz wrote:My suggestion is to add

Code: Select all

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..
[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.
User avatar
Sir_Fz
Revered One
Posts: 3794
Joined: Sun Apr 27, 2003 3:10 pm
Location: Lebanon
Contact:

Post by Sir_Fz »

replace $exempt_flags with [channel get $channel mc.ban_channel.exempt.flags]
M
MoralityAcademy
Voice
Posts: 4
Joined: Tue Feb 27, 2007 12:11 am

Post by MoralityAcademy »

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 :D

Thank you guys..! :D :D :D :D :D :D :D :D
User avatar
rosc2112
Revered One
Posts: 1454
Joined: Sun Feb 19, 2006 8:36 pm
Location: Northeast Pennsylvania

Post by rosc2112 »

Mine had an extra ] at the end, remove that. And as far as ircops, too bad for them, they get banned from my channels :P

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> :P)

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 :P :P :P
User avatar
Alchera
Revered One
Posts: 3344
Joined: Mon Aug 11, 2003 12:42 pm
Location: Ballarat Victoria, Australia
Contact:

Post by Alchera »

This IRCOp "thing" is interesting. :lol: 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".
[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
Post Reply