PHP Developers Network

A community of PHP developers offering assistance, advice, discussion, and friendship.
 
Loading
It is currently Sun Jul 21, 2019 4:38 am

All times are UTC - 5 hours




Post new topic Reply to topic  [ 34 posts ]  Go to page Previous  1, 2, 3  Next
Author Message
 Post subject:
PostPosted: Fri Apr 02, 2004 11:30 am 
Offline
Tutorials Group

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


Top
 Profile  
 
 Post subject:
PostPosted: Thu Jun 03, 2004 12:14 pm 
Offline
Forum Contributor

Joined: Tue May 25, 2004 4:28 pm
Posts: 234


Top
 Profile  
 
 Post subject:
PostPosted: Thu Jun 03, 2004 12:22 pm 
Offline
DevNet Resident

Joined: Sun Jul 20, 2003 9:25 pm
Posts: 1150
Location: West Yorkshire, England
You set it in the database:

#holds access details to the bots controls
CREATE TABLE access (
user varchar(20) NOT NULL,
level tinyint(1) NOT NULL default '1',
channel varchar(255) NOT NULL,
server varchar(255) NOT NULL
);

First set yourself as level 9, and then you can use the !adduser command.


Top
 Profile  
 
 Post subject:
PostPosted: Tue Aug 10, 2004 2:44 pm 
Offline
Forum Newbie

Joined: Tue Aug 10, 2004 2:44 pm
Posts: 1
There is a designers flaw in the message parsing engine within the core engine, namely this:
Syntax: [ Download ] [ Hide ]
$message = str_replace("$params[2]", "", $message);

This will replace every instance of the word, same as channel or user (wasn't tested on user) with null... Not good... It's better to use
Syntax: [ Download ] [ Hide ]
$message = substr($message,strlen($params[2]));


Top
 Profile  
 
 Post subject:
PostPosted: Sun Oct 10, 2004 8:55 am 
Offline
Forum Newbie

Joined: Sun Oct 10, 2004 8:36 am
Posts: 7
Just wanted to thank you for that link in your weather function, it was very useful to me. ;)


Top
 Profile  
 
 Post subject: Great!!
PostPosted: Tue Nov 09, 2004 1:12 am 
Offline
Forum Commoner

Joined: Tue Nov 09, 2004 1:05 am
Posts: 53
Wow, this is great.. worked first time and a great base to start messing with PHP bots from IRC.

Couple of questions...

1. Has anyone worked on this - any updates anywhere, or other sites/projects that might be useful for IRC bots?

2. I PMed the author about this, but would like other feedback: when I do !help in channel, the bot messages me the help fine, but it does it at about 1 line per second - and I can't see why that would be from the code.. anyone suggest why it does this? It's not lag, i'm on a single IRC server, and other commands, e.g. !weather pop back their result immediately.

Thanks for any help.


Top
 Profile  
 
 Post subject:
PostPosted: Wed Nov 24, 2004 4:10 am 
Offline
Forum Commoner

Joined: Tue Nov 09, 2004 1:05 am
Posts: 53
Just in case anyone's reading this thread, there's a PEAR IRC class called Net_SmartIRC that pretty much makes writing your own PHP IRC class re-inventing the wheel - it does everything I need from a PHP class at the moment and is probably a good base to start from if you need a class to do something else.


Top
 Profile  
 
 Post subject:
PostPosted: Sat Nov 27, 2004 2:39 pm 
Offline
Forum Contributor
User avatar

Joined: Fri Aug 01, 2003 7:40 pm
Posts: 115
Location: Sask, Regina
Does anyone know of any good tutorials on making bots with PHP?

I cant seem to find any.


Top
 Profile  
 
 Post subject:
PostPosted: Sat Nov 27, 2004 3:38 pm 
Offline
Forum Commoner

Joined: Tue Nov 09, 2004 1:05 am
Posts: 53
See my previous post ( !!! ) , RTFM for that and you'll be all set to make your own IRC bot.


Top
 Profile  
 
 Post subject:
PostPosted: Sat Nov 27, 2004 4:29 pm 
Offline
DevNet Master

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


Top
 Profile  
 
 Post subject:
PostPosted: Sat Nov 27, 2004 6:19 pm 
Offline
DevNet Resident

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


Top
 Profile  
 
 Post subject:
PostPosted: Sun Nov 28, 2004 4:24 am 
Offline
Forum Commoner

Joined: Tue Nov 09, 2004 1:05 am
Posts: 53
Yeah sorry, RTFM was a bit strong for that, I meant 'rtm', as the docs for Net_SmartIRC include a lot of very useful pretty easy to understand and tweak examples, which would get you going pretty quick. A simple 'bot' that actually does something is 10 lines of code with Net_SmartIRC, so it's very easy to get going.


Top
 Profile  
 
 Post subject:
PostPosted: Sat Jan 08, 2005 6:22 am 
Offline
Forum Newbie

Joined: Sat Jan 08, 2005 6:13 am
Posts: 3


Top
 Profile  
 
 Post subject: Re: PHP IRC Bot Class
PostPosted: Sat Jun 21, 2008 2:02 pm 
Offline
Forum Newbie

Joined: Sat Jun 21, 2008 2:00 pm
Posts: 1
hm, trying to use the phpurple extension, has anyone already expierienced it?

http://thinker.rubay.de/archives/20-PHP ... l#extended


Top
 Profile  
 
 Post subject: Re: PHP IRC Bot Class
PostPosted: Wed Oct 15, 2008 12:27 am 
Offline
Forum Newbie

Joined: Wed Oct 15, 2008 12:20 am
Posts: 2


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

All times are UTC - 5 hours


Who is online

Users browsing this forum: No registered users and 2 guests


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