PHP Developers Network

A community of PHP developers offering assistance, advice, discussion, and friendship.
 
Loading
It is currently Fri Nov 15, 2019 11:41 am

All times are UTC - 5 hours




Post new topic Reply to topic  [ 34 posts ]  Go to page 1, 2, 3  Next
Author Message
 Post subject: PHP IRC Bot Class
PostPosted: Sun Jan 18, 2004 9:36 am 
Offline
DevNet Resident

Joined: Sun Jul 20, 2003 9:25 pm
Posts: 1150
Location: West Yorkshire, England


Top
 Profile  
 
 Post subject:
PostPosted: Sun Jan 18, 2004 2:38 pm 
Offline
DevNet Master

Joined: Thu Jan 30, 2003 9:26 pm
Posts: 2893
Location: Glasgow, Scotland


Top
 Profile  
 
 Post subject:
PostPosted: Mon Jan 19, 2004 1:25 am 
Offline
DevNet Resident

Joined: Sun Jul 20, 2003 9:25 pm
Posts: 1150
Location: West Yorkshire, England


Top
 Profile  
 
 Post subject:
PostPosted: Thu Mar 18, 2004 4:33 pm 
Offline
Forum Newbie

Joined: Thu Mar 18, 2004 4:33 pm
Posts: 4


Top
 Profile  
 
 Post subject:
PostPosted: Fri Mar 19, 2004 11:08 am 
Offline
Tutorials Group

Joined: Sun Jan 04, 2004 11:30 pm
Posts: 2692
Once you've called the bot, and its connected, what keeps it active? Ie, why does it remain on the channel, and keep the connection open?

I would have thought that the connection would timeout after some period of time if the calling program didnt continue to communicate with it.


Top
 Profile  
 
 Post subject:
PostPosted: Fri Mar 19, 2004 11:20 am 
Offline
Forum Regular
User avatar

Joined: Thu Jan 08, 2004 12:22 pm
Posts: 926
Location: ecuador
Havents looked at the complete script, however i am kinda a oldtimer on the networks of irc.

Regarding youre question on what keeps it alive. ( a ping )

when the nick / b0t gets ping timedout it will be kicked of the network of just simply disconnect itself.

However i do suggest you use a BNC for running b0ts. I do not know youre connection or the network youre on, however if you do have a pretty nice channel lets say over 400 p33ps youre b0t is bound to be attacked.


Top
 Profile  
 
 Post subject:
PostPosted: Fri Mar 19, 2004 11:29 am 
Offline
Tutorials Group

Joined: Sun Jan 04, 2004 11:30 pm
Posts: 2692


Top
 Profile  
 
 Post subject:
PostPosted: Fri Mar 19, 2004 6:57 pm 
Offline
DevNet Master

Joined: Tue Jan 20, 2004 12:11 am
Posts: 4897
Location: Leuven, Belgium
I've seen also some webbased IRC scripts written in php (script puts data in db, and javascripts makes sure the page gets reloaded every 10 Seconds) and they generate a smurf :P

Btw, screen and irssi are my alltime favorites :)


Top
 Profile  
 
 Post subject:
PostPosted: Sat Mar 27, 2004 8:48 am 
Offline
Forum Newbie

Joined: Sat Mar 27, 2004 8:48 am
Posts: 1
yo - ive made my own one but this one is more complex and has given me alot of ideas :P


Top
 Profile  
 
 Post subject:
PostPosted: Sat Mar 27, 2004 10:05 am 
Offline
Site Admin
User avatar

Joined: Thu Apr 18, 2002 3:21 pm
Posts: 209
Location: Springmont, PA USA


Top
 Profile  
 
 Post subject:
PostPosted: Sun Mar 28, 2004 10:04 pm 
Offline
Tutorials Group

Joined: Sun Jan 04, 2004 11:30 pm
Posts: 2692


Top
 Profile  
 
 Post subject:
PostPosted: Sun Mar 28, 2004 10:28 pm 
Offline
DevNet Resident
User avatar

Joined: Thu Oct 16, 2003 5:49 pm
Posts: 1972
Location: Manchester (UK)
The while (!feof($this->fp)){ ... } loop in the receive method keeps the script constantly looping. The
if($this->data[ping] == 'PING'){
$this->send("PONG");
}
in the parse_data method keeps the connection alive by responding to PING with a PONG, that stops the irc server 'dropping' the client.


Top
 Profile  
 
 Post subject:
PostPosted: Mon Mar 29, 2004 7:23 am 
Offline
DevNet Resident

Joined: Tue Nov 18, 2003 2:09 pm
Posts: 1826
Location: Middlesbrough, UK
this is a very interesting read.........


Top
 Profile  
 
 Post subject:
PostPosted: Mon Mar 29, 2004 9:19 am 
Offline
DevNet Master

Joined: Tue Jan 20, 2004 12:11 am
Posts: 4897
Location: Leuven, Belgium
everything you ever wanted to know about irc :)


Top
 Profile  
 
 Post subject:
PostPosted: Fri Apr 02, 2004 1:58 am 
Offline
DevNet Resident

Joined: Sun Jul 20, 2003 9:25 pm
Posts: 1150
Location: West Yorkshire, England


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 34 posts ]  Go to page 1, 2, 3  Next

All times are UTC - 5 hours


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  
Powered by phpBB® Forum Software © phpBB Group