PHP-IRC Topic

Moderator: GeekShed.Net Staff

PHP-IRC Topic

Postby craighton » Tue Feb 09, 2010 4:13 am

I am messing around with the PHP-IRC bot and I need some help coding in PHP a topic script. I want it to have 3 parts that I can set individually, "!topic" for the main Topic. "!status" for the status of the person like "Craighton is <status>" and finally a Static Text. Any help would be great!
User avatar
craighton
 
Posts: 18
Joined: Thu Oct 29, 2009 5:12 am
Location: Seattle, Washington

Re: PHP-IRC Topic

Postby Phil » Tue Feb 09, 2010 9:41 am

Depends on how the bot works. Typically, read the buffer, split the lines from it, loop the lines individually, check the type of command, use substr() if it's a PRIVMSG to match sections of the string.

Phil
Phil
 
Posts: 142
Joined: Thu Oct 22, 2009 8:16 pm

Re: PHP-IRC Topic

Postby craighton » Tue Feb 09, 2010 10:40 pm

Phil your talking to someone who only knows a lick of PHP coding
User avatar
craighton
 
Posts: 18
Joined: Thu Oct 29, 2009 5:12 am
Location: Seattle, Washington

Re: PHP-IRC Topic

Postby techhelper1 » Tue Apr 27, 2010 5:41 am

I don't know if you remember Visnew Cezor (Freelancer), he wrote a php topic script.

http://github.com/visnew/IRC-Topic-Management-System

But he requires Phil to make a Link Block for this to work. It would make a great new feature here.
techhelper1
 
Posts: 1
Joined: Sun Apr 11, 2010 12:15 am

Re: PHP-IRC Topic

Postby edgy » Sun May 02, 2010 4:18 pm

It would be pretty simple to make something like this.

All you would really need to do is listen for stuff like !status and then set (for example) $status to that and then /topic channel $prepend: $topic $divider $owner $status $divider $static.

If you post the original code to your bot I would be happy to take a look.

I am also coding an IRC bot with some code started off for me from Hawkee.com. I am attempting to write something like you are trying to into my bot now. I will post my results here when I get it done.
Image
Follow me on Twitter: http://twitter.com/edgy360
User avatar
edgy
 
Posts: 37
Joined: Sun Dec 27, 2009 11:29 am
Location: United Kingdom

Re: PHP-IRC Topic

Postby edgy » Tue Dec 07, 2010 8:49 pm

Sorry for bringing up an old topic but do you still want something like this making?
Image
Follow me on Twitter: http://twitter.com/edgy360
User avatar
edgy
 
Posts: 37
Joined: Sun Dec 27, 2009 11:29 am
Location: United Kingdom


Return to Script help

Who is online

Users browsing this forum: No registered users and 7 guests

cron