I'm implementing an IRC client for one of my courses in the university. I've started working with SmartIRC but I'm stuck right now. I've been looking at this forum and most of the times people make use of bots for dealing with clients in the channel but, sending messages in response to users' messages but, they never show how to send a message from a user (i mean, the message the bot is supposed to catch). Any help on how to do that (what method or anything)?.
Also, should I implement a bot for my application?. what would be the best way to do this?. I'm not very familiarized with IRC.
Thanks.
-Victor.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Anonymous
-
2004-02-27
php really isn't the best medium for an IRC client since data can only be sent to web server running the client via GET or POST. java or c++ woould probably be eaiser. However I am going to assume you dont have a choice on the languange in which to implement your client. Yes you should implement a bot, it is the only way to send messages to the channel. You could, I suppose, have one window/frame to display what the bot 'hears'. Maybe have it refresh every second or two, or just have php keep the connection open and have it print what it hears when it hears it. Sending messages would be a little trickier. You could mayeb have a form which stores messages you enter into a database and have the bot check the db every couple seconds or so and repeat the new messages into the IRC channel.
I beleive there were a couple of threads a while back that delt with this.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi:
I'm implementing an IRC client for one of my courses in the university. I've started working with SmartIRC but I'm stuck right now. I've been looking at this forum and most of the times people make use of bots for dealing with clients in the channel but, sending messages in response to users' messages but, they never show how to send a message from a user (i mean, the message the bot is supposed to catch). Any help on how to do that (what method or anything)?.
Also, should I implement a bot for my application?. what would be the best way to do this?. I'm not very familiarized with IRC.
Thanks.
-Victor.
php really isn't the best medium for an IRC client since data can only be sent to web server running the client via GET or POST. java or c++ woould probably be eaiser. However I am going to assume you dont have a choice on the languange in which to implement your client. Yes you should implement a bot, it is the only way to send messages to the channel. You could, I suppose, have one window/frame to display what the bot 'hears'. Maybe have it refresh every second or two, or just have php keep the connection open and have it print what it hears when it hears it. Sending messages would be a little trickier. You could mayeb have a form which stores messages you enter into a database and have the bot check the db every couple seconds or so and repeat the new messages into the IRC channel.
I beleive there were a couple of threads a while back that delt with this.