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.

string match? and -nocase ??

Old posts that have not been replied to for several years.
User avatar
caesar
Mint Rubber
Posts: 3778
Joined: Sun Oct 14, 2001 8:00 pm
Location: Mint Factory

Post by caesar »

Well, I haven't understood wich is the best :) I'll look again there and follow egghead instructions and his last code ad hope this will work.
Once the game is over, the king and the pawn go back in the same box.
User avatar
caesar
Mint Rubber
Posts: 3778
Joined: Sun Oct 14, 2001 8:00 pm
Location: Mint Factory

Post by caesar »

As I have said in the other post where is talking about this, using this part of the code:

Code: Select all

foreach word [split $arg] { 
  if {![string match "*#*" $word]} { continue } 
  if  {[string compare -nocase $word $chan] == 0 } { continue } 
I have come to the conclusion that my eggdrop is now a bit slow when this is a spam on the channel. Any other alternative, maybe an faster one?
Once the game is over, the king and the pawn go back in the same box.
User avatar
stdragon
Owner
Posts: 959
Joined: Sun Sep 23, 2001 8:00 pm
Contact:

Post by stdragon »

It's probably your imagination that the bot is slowing down. It only takes a couple microseconds to execute the code. Also, as long as your bind is matching for "*#*" then it's only executing when there's a good chance there is spam. It really shouldn't be noticeable.

Given that the code is one of the fastest ones, it's unlikely that using other code will make it appreciably faster. If your bot is slowing down because of this, you need a new computer :)
User avatar
caesar
Mint Rubber
Posts: 3778
Joined: Sun Oct 14, 2001 8:00 pm
Location: Mint Factory

Post by caesar »

I'm using an bind like: bind pubm - {* *#*} no:adv. Probably the eggdrop/server had a bit lag, and this can explain why it was slow, I guess. Thanks for the fill in. :)

LoL.. no my pc ain't slow, P4 at 1.2 <- if this is slow, then I'm the president of USA, and I'm not :)
Once the game is over, the king and the pawn go back in the same box.
p
ppslim
Revered One
Posts: 3914
Joined: Sun Sep 23, 2001 8:00 pm
Location: Liverpool, England

Post by ppslim »

Other factors can affect speed.

Machine load? If the machine is under high load, then it will of cause be slow.

Low on memory? If the machine is low on memory, then is will be heavily using swap space, which is tiem consuming.

OS? Background tasks, and OS design will slow down a system a lot (IE, windows is crap).

Optimsation? This mainly ties in with OS, but unoptimsed code will reult in poor overall performance, both of the bot and the machine. CGYWIN is probably one of theworst environments to run it under.

Overrun system? While a system may not be under high load, or low memory as such, sustained midrange loads will affect the performance. Eggdrops are designed for servers. A server is designed for specifi jobs. As such, the less you run the better.

Combination: By combining only two of these, you can mroe than double your problems, that is obvious. So, you may have a fast machine, but what else is it used for.`
User avatar
caesar
Mint Rubber
Posts: 3778
Joined: Sun Oct 14, 2001 8:00 pm
Location: Mint Factory

Post by caesar »

This is not a problem with the server my eggdrop is running one, I guess is lag on irc or something like this.
Once the game is over, the king and the pawn go back in the same box.
Locked