Parsing Help
Posted: Sun Mar 18, 2007 7:25 pm
I am making a PHP IRC bot and I need help parsing some lines from a whois. The whole thing I need to parse is...
In the second line it says
I want to check if the channel the bot is in which is in a variable called $chan, if there is an @ before it. How would I do this?
So let's say the chan is #darkneo, I want to parse the script to check if there is a @ before #darkneo.
Code: Select all
[00:22:17] <- :talon.nl.eu.SwiftIRC.net 311 [PHP]Darkneobot Dark-And-Dead-Hero ~wildfire 35720160.18EC537F.B82AB597.IP * :Lee Merriman
[00:22:17] <- :talon.nl.eu.SwiftIRC.net 319 [PHP]Darkneobot Dark-And-Dead-Hero :@#darkneo
[00:22:17] <- :talon.nl.eu.SwiftIRC.net 312 [PHP]Darkneobot Dark-And-Dead-Hero hyperion.fl.us.SwiftIRC.net :Hyperion
[00:22:17] <- :talon.nl.eu.SwiftIRC.net 307 [PHP]Darkneobot Dark-And-Dead-Hero :has identified for this nick
[00:22:17] <- :talon.nl.eu.SwiftIRC.net 318 [PHP]Darkneobot Dark-And-Dead-Hero :End of /WHOIS list.In the second line it says
Code: Select all
[00:22:17] <- :talon.nl.eu.SwiftIRC.net 319 [PHP]Darkneobot Dark-And-Dead-Hero :@#darkneoSo let's say the chan is #darkneo, I want to parse the script to check if there is a @ before #darkneo.