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 

Hi, need help to edit script
Goto page Previous  1, 2
 
Post new topic   Reply to topic    egghelp.org community Forum Index -> Script Requests
View previous topic :: View next topic  
Author Message
metroid
Owner


Joined: 16 Jun 2004
Posts: 771

PostPosted: Mon Jan 14, 2008 10:28 am    Post subject: Reply with quote

You should use braces in 'if' expressions.

Have a look at this example to see the difference in speed Smile

Quote:
% time { expr 10 * 5 } 1000
2.833 microseconds per iteration
% time { expr {10 * 5} } 1000
0.262 microseconds per iteration
Back to top
View user's profile Send private message
g0m3z
Voice


Joined: 30 Nov 2007
Posts: 11

PostPosted: Mon Jan 14, 2008 10:55 am    Post subject: Reply with quote

Thanks a lot. I wandered if there was anyhing to do, so that the bot would react faster.
Back to top
View user's profile Send private message
g0m3z
Voice


Joined: 30 Nov 2007
Posts: 11

PostPosted: Tue Jan 15, 2008 11:49 am    Post subject: Reply with quote

So does anyone know how to include badwords.txt in my script so i would be able just edit that file to add more badwords for bot react?

Code:

# actban variable is setting ban time in minutes
# use 0 to make perm
set actban 10
 
bind ctcp - ACTION ban:act

proc ban:act { nick uhost hand dest key text } {
  #uncomment next line to exclude chanops
if {[isop $nick] || [matchattr $hand f|f $dest]} { return 0 }
  newban ~q:*!$uhost $::botnick action_ban $::actban
  foreach chan [channels] {
    if [onchan $nick $chan] { pushmode $chan +b ~q:*!*@[lindex [split $uhost @] 1]  } 
  }
}
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    egghelp.org community Forum Index -> Script Requests All times are GMT - 4 Hours
Goto page Previous  1, 2
Page 2 of 2

 
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