php irc bot

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
rbzz
Forum Newbie
Posts: 5
Joined: Mon Aug 24, 2009 11:07 am

php irc bot

Post by rbzz »

It's twisting my mind lately, but i can't figure out how i'm gonna do it.
Here's the deal:

I'm creating a php irc bot and using the command:
!admin add <nickname>

I just wanted to know if its possible that if the name is in the channel the bot does /whois on the nickname, puts it in a array
and uses it later for putting it in my mysql db. On the moment i'm just using !admin add for the person itself, then its easy to strip
from the data and insert it in db.

code for the auth when a user says some,
$raw[0] = nickname info (vb :user!test@quakenet.users.org):

Code: Select all

 
function host($str) {
    $set  = substr(array_shift(explode('@',$str)),1);
    $set2 = str_replace($set, "", $str);
    return str_replace(":", "", $set2);
}
 
after this it keeps @quakenet.... because if someone is namechanging it keeps
working with the bot.
Anyhow it must only work when i'm !admin add <someone> and not when they do it thereself.

Can anyone help me with this?
rbzz
Forum Newbie
Posts: 5
Joined: Mon Aug 24, 2009 11:07 am

Re: php irc bot

Post by rbzz »

' bump '
rbzz
Forum Newbie
Posts: 5
Joined: Mon Aug 24, 2009 11:07 am

Re: php irc bot

Post by rbzz »

anyone?
rbzz
Forum Newbie
Posts: 5
Joined: Mon Aug 24, 2009 11:07 am

Re: php irc bot

Post by rbzz »

bump bump pow - black eyed pies
rbzz
Forum Newbie
Posts: 5
Joined: Mon Aug 24, 2009 11:07 am

Re: php irc bot

Post by rbzz »

urboemba shakalala
User avatar
John Cartwright
Site Admin
Posts: 11470
Joined: Tue Dec 23, 2003 2:10 am
Location: Toronto
Contact:

Re: php irc bot

Post by John Cartwright »

I'm going to have to ask you to stop bumping this thread (as per our rules which can be found in my signature). You should consider rewriting your thread with more explanation to your issue.
Post Reply