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.

Define channels to work on and handle +bbbb

Requests for complete scripts or modifications/fixes for scripts you didn't write. Response not guaranteed, and no thread bumping!
Post Reply
I
IRCNick
Halfop
Posts: 64
Joined: Wed Oct 12, 2005 9:43 pm
Location: Germany
Contact:

Define channels to work on and handle +bbbb

Post by IRCNick »

How can I make this proc to work only for certain channels and to can handle +bbbb, now is removing only 1 ban? Thank you

Code: Select all

bind mode "-" "* -b" remove_ban
proc remove_ban {nick uhost hand chan mdechg ban} {
 global botnick
 if {!([isop $botnick $chan])} {return 0}
  if {[matchattr [nick2hand $nick] o]} {return 0}
        putserv "MODE $chan -o+v $nick $nick" 
User avatar
caesar
Mint Rubber
Posts: 3776
Joined: Sun Oct 14, 2001 8:00 pm
Location: Mint Factory

Post by caesar »

To make this work for some specific channel(s) either use "setudef flag" and make a special flag that will be enabled/disabled (via ".chanset #channel +/-your_flag" from dcc chat/telnet with eggdrop) to make the script be active/inactive on that channel and add a line like:

Code: Select all

if {![channel get $channel your_flag]} return
to stop/continue where the "your_flag" is disabled/enabled (meaning -/+your_flag in ".chaninfo #channel"). As for your second question, use a slower queue like "pushmode" folowed by "flushmode"
Once the game is over, the king and the pawn go back in the same box.
User avatar
De Kus
Revered One
Posts: 1361
Joined: Sun Dec 15, 2002 11:41 am
Location: Germany

Post by De Kus »

You should not use flushmode (I haven't noticed significantly improoved speed anyway), if you want pushmode to add modes into one line from diffrent TCL calls. You might be lucky to not trigger a queue flush till all -b are processed (its not triggered every main loop cycle afaik), you can also be unlucky :D.

btw. the proc can't handle -bbbb unless you bind to raw MODE and check for -bbbb in the arguments.
De Kus
StarZ|De_Kus, De_Kus or DeKus on IRC
Copyright © 2005-2009 by De Kus - published under The MIT License
Love hurts, love strengthens...
I
IRCNick
Halfop
Posts: 64
Joined: Wed Oct 12, 2005 9:43 pm
Location: Germany
Contact:

Post by IRCNick »

@De Kus

Can you make for me a simple sample
I
IRCNick
Halfop
Posts: 64
Joined: Wed Oct 12, 2005 9:43 pm
Location: Germany
Contact:

Post by IRCNick »

anyone ?
User avatar
DragnLord
Owner
Posts: 711
Joined: Sat Jan 24, 2004 4:58 pm
Location: C'ville, Virginia, USA

Post by DragnLord »

be precise in what you want, then post it in Script Requests (which is where requests for whole scripts belong)
User avatar
caesar
Mint Rubber
Posts: 3776
Joined: Sun Oct 14, 2001 8:00 pm
Location: Mint Factory

Post by caesar »

I have told you some stuff with that can accomplish what you have wanted in the first place. Have you even bothered to give that a try? May I doubt that you did?
Once the game is over, the king and the pawn go back in the same box.
User avatar
demond
Revered One
Posts: 3073
Joined: Sat Jun 12, 2004 9:58 am
Location: San Francisco, CA
Contact:

Post by demond »

IRCNick wrote:anyone ?

Code: Select all

bind raw - mode foo
proc foo {f k t} {
   if {[lindex [split $t] 1] == "-bbbb"} {
   # do stuff
   }
}
needless to say, this thing won't work if the unban modes are mixed with others, like -vbvb
connection, sharing, dcc problems? click <here>
before asking for scripting help, read <this>
use

Code: Select all

 tag when posting logs, code
I
IRCNick
Halfop
Posts: 64
Joined: Wed Oct 12, 2005 9:43 pm
Location: Germany
Contact:

Post by IRCNick »

Sorry I mined that with a little bit help, I can finished it to do what I want, but now I'm understanding that I wrote in the wrong forum.
@Moderators
Please move the threat in the scripts request forum, or I have to duplicate it there. Thank you

moved. - caesar
Post Reply