| View previous topic :: View next topic |
| Author |
Message |
metroid Owner
Joined: 16 Jun 2004 Posts: 771
|
Posted: Mon Jan 14, 2008 10:28 am Post subject: |
|
|
You should use braces in 'if' expressions.
Have a look at this example to see the difference in speed
| Quote: | % time { expr 10 * 5 } 1000
2.833 microseconds per iteration
% time { expr {10 * 5} } 1000
0.262 microseconds per iteration |
|
|
| Back to top |
|
 |
g0m3z Voice
Joined: 30 Nov 2007 Posts: 11
|
Posted: Mon Jan 14, 2008 10:55 am Post subject: |
|
|
| Thanks a lot. I wandered if there was anyhing to do, so that the bot would react faster. |
|
| Back to top |
|
 |
g0m3z Voice
Joined: 30 Nov 2007 Posts: 11
|
Posted: Tue Jan 15, 2008 11:49 am Post subject: |
|
|
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 |
|
 |
|