egghelp.org community Forum Index
[ egghelp.org home | forum home ]
egghelp.org community
Discussion of eggdrop bots, shell accounts and tcl scripts.
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Define channels to work on and handle +bbbb

 
Post new topic   Reply to topic    egghelp.org community Forum Index -> Script Requests
View previous topic :: View next topic  
Author Message
IRCNick
Halfop


Joined: 12 Oct 2005
Posts: 64
Location: Germany

PostPosted: Tue May 30, 2006 7:01 am    Post subject: Define channels to work on and handle +bbbb Reply with quote

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
View user's profile Send private message Visit poster's website
caesar
Mint Rubber


Joined: 14 Oct 2001
Posts: 3741
Location: Mint Factory

PostPosted: Tue May 30, 2006 12:22 pm    Post subject: Reply with quote

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
View user's profile Send private message
De Kus
Revered One


Joined: 15 Dec 2002
Posts: 1361
Location: Germany

PostPosted: Tue May 30, 2006 1:06 pm    Post subject: Reply with quote

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 Very Happy.

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
View user's profile Send private message MSN Messenger
IRCNick
Halfop


Joined: 12 Oct 2005
Posts: 64
Location: Germany

PostPosted: Wed May 31, 2006 8:24 am    Post subject: Reply with quote

@De Kus

Can you make for me a simple sample
Back to top
View user's profile Send private message Visit poster's website
IRCNick
Halfop


Joined: 12 Oct 2005
Posts: 64
Location: Germany

PostPosted: Fri Jun 02, 2006 8:06 am    Post subject: Reply with quote

anyone ?
Back to top
View user's profile Send private message Visit poster's website
DragnLord
Owner


Joined: 24 Jan 2004
Posts: 711
Location: C'ville, Virginia, USA

PostPosted: Fri Jun 02, 2006 8:53 am    Post subject: Reply with quote

be precise in what you want, then post it in Script Requests (which is where requests for whole scripts belong)
Back to top
View user's profile Send private message
caesar
Mint Rubber


Joined: 14 Oct 2001
Posts: 3741
Location: Mint Factory

PostPosted: Fri Jun 02, 2006 2:19 pm    Post subject: Reply with quote

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
View user's profile Send private message
demond
Revered One


Joined: 12 Jun 2004
Posts: 3073
Location: San Francisco, CA

PostPosted: Sat Jun 03, 2006 2:03 am    Post subject: Reply with quote

IRCNick wrote:
anyone ?

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
View user's profile Send private message Visit poster's website
IRCNick
Halfop


Joined: 12 Oct 2005
Posts: 64
Location: Germany

PostPosted: Mon Jun 05, 2006 9:57 am    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    egghelp.org community Forum Index -> Script Requests All times are GMT - 4 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Forum hosting provided by Reverse.net

Powered by phpBB © 2001, 2005 phpBB Group
subGreen style by ktauber