Code Comments
Programming Forum and web based access to our favorite programming groups.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
Post Follow-up to this messageJames 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
Post Follow-up to this message
Show a Printable Version
Email This Page to Someone!
Receive updates to this thread
Powered by vBulletin
Copyright 2000-2006 Jelsoft Enterprises Limited.