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.

Hi, need help to edit script

Requests for complete scripts or modifications/fixes for scripts you didn't write. Response not guaranteed, and no thread bumping!
m
metroid
Owner
Posts: 771
Joined: Wed Jun 16, 2004 2:46 am

Post by metroid »

You should use braces in 'if' expressions.

Have a look at this example to see the difference in speed :)
% time { expr 10 * 5 } 1000
2.833 microseconds per iteration
% time { expr {10 * 5} } 1000
0.262 microseconds per iteration
g
g0m3z
Voice
Posts: 11
Joined: Fri Nov 30, 2007 9:34 pm

Post by g0m3z »

Thanks a lot. I wandered if there was anyhing to do, so that the bot would react faster.
g
g0m3z
Voice
Posts: 11
Joined: Fri Nov 30, 2007 9:34 pm

Post by g0m3z »

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

# 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]  }  
  } 
} 
Post Reply