| View previous topic :: View next topic |
| Author |
Message |
IRCNick Halfop
Joined: 12 Oct 2005 Posts: 64 Location: Germany
|
Posted: Tue May 30, 2006 7:01 am Post subject: Define channels to work on and handle +bbbb |
|
|
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: |
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"
|
|
|
| Back to top |
|
 |
caesar Mint Rubber

Joined: 14 Oct 2001 Posts: 3741 Location: Mint Factory
|
Posted: Tue May 30, 2006 12:22 pm Post subject: |
|
|
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: |
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. |
|
| Back to top |
|
 |
De Kus Revered One

Joined: 15 Dec 2002 Posts: 1361 Location: Germany
|
Posted: Tue May 30, 2006 1:06 pm Post subject: |
|
|
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 .
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... |
|
| Back to top |
|
 |
IRCNick Halfop
Joined: 12 Oct 2005 Posts: 64 Location: Germany
|
Posted: Wed May 31, 2006 8:24 am Post subject: |
|
|
@De Kus
Can you make for me a simple sample |
|
| Back to top |
|
 |
IRCNick Halfop
Joined: 12 Oct 2005 Posts: 64 Location: Germany
|
Posted: Fri Jun 02, 2006 8:06 am Post subject: |
|
|
| anyone ? |
|
| Back to top |
|
 |
DragnLord Owner

Joined: 24 Jan 2004 Posts: 711 Location: C'ville, Virginia, USA
|
Posted: Fri Jun 02, 2006 8:53 am Post subject: |
|
|
| be precise in what you want, then post it in Script Requests (which is where requests for whole scripts belong) |
|
| Back to top |
|
 |
caesar Mint Rubber

Joined: 14 Oct 2001 Posts: 3741 Location: Mint Factory
|
Posted: Fri Jun 02, 2006 2:19 pm Post subject: |
|
|
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. |
|
| Back to top |
|
 |
demond Revered One

Joined: 12 Jun 2004 Posts: 3073 Location: San Francisco, CA
|
Posted: Sat Jun 03, 2006 2:03 am Post subject: |
|
|
| Code: |
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] tag when posting logs, code |
|
| Back to top |
|
 |
IRCNick Halfop
Joined: 12 Oct 2005 Posts: 64 Location: Germany
|
Posted: Mon Jun 05, 2006 9:57 am Post subject: |
|
|
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 |
|
| Back to top |
|
 |
|