Home > Archive > PHP Pear > March 2005 > SmartIRC
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
|
|
| James Horne 2005-03-26, 3:57 am |
| Hi there,
Firstly I'd like to say that you guys have done an awesome job
so far, keep it up!
Here's my situation:
I want to use SmartIRC to send messages on the fly to an IRC
channel for a monitoring type solution. Now, I can start the bot and connect
and send messages all that from the one script, but obviously I don't want
to have to start a new bot every time. I want to send a message to the
channel using the same bot but, as I said before, "on the fly".
Basically I need it to do the following: when someone sends a query to a
database, the php script sends information about it to the IRC channel via
SmartIRC. As I said, I don't want to constantly create new bots; so
basically my question is:
Can I use a running bot from another script?
How?
I hope you can help me, you guys provide a good alternative to recompiling
php with ircg support.
Thanks for you time,
-James Horne
| |
| Greg Beaver 2005-03-26, 3:57 am |
| James Horne wrote:
> Can I use a running bot from another script?
> How?
Not having ever looked at SmartIRC's code, the safest way would be to
have an intermediary table that contains information to spit to the
channel, and have the bot check the table for new rows while idling.
When it finds them, it would delete, then display the rows.
The other end would simply insert the thing to display into the table.
Be aware - if anyone can access the script that does the queries, you
are vulnerable to all kinds of nasty attacks (imagine your bot flooding
out as someone does DoS attacks... bad)
Good luck :)
Greg
|
|
|
|
|