F*U*R*B*Y* commented on a Page, PHP to IRC Bot V2.0  -  Jun 09, 2008

First thing i notice, you got this off of a tutorial, as i got my first bot of there, and the problem is it\'ll only get the first 128 characters, to fix it change

while($data = fgets($socket, 128)) {

to

while($data = fgets($socket)) {

secondly i\'d do like a server function... something like

function send ($action, $channel, $extra, $message) {
if (isset($extra)) { fputs($socket, $action $channel $extra .\":\".$message.\"\\n\"); }
else { fputs($socket, $action $channel .\":\".$message.\"\\n\"); }
}

then that way all you have to do is send(\"MODE\",$ex[2],\"+o\",$ex[4]); or stuff like that :)

Thirdly, you have an extra closing bracket on the end :)

Fourthly, It isn\'t exactly a \"PHP to IRC\" it is a \"PHP IRC Bot\". When i saw \"PHP to IRC\" i thought it was a IRCd Scripted in PHP. But its only a PHP IRC Bot :) so perhaps you\'d like to change the title?

Besides that, good job.

Furby

 Respond  
Are you sure you want to unfollow this person?
Are you sure you want to delete this?
Click "Unsubscribe" to stop receiving notices pertaining to this post.
Click "Subscribe" to resume notices pertaining to this post.