Raised This Month: $ Target: $400
 0% 

irc bot


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Nyuszy
Senior Member
Join Date: Apr 2009
Old 04-25-2011 , 14:02   irc bot
Reply With Quote #1

how can i make a simple irc bot?

i try this, but it don't work:

Code:
#include <amxmodx> #include <sockets> new socket public plugin_init() {     irc_connect()         register_concmd("irc_msg", "msg")     register_concmd("irc_con", "connect_bot") } irc_connect() {     new error = 0     socket = socket_open("irc.******.net", 6667, SOCKET_TCP, error)         if(error > 0)     {         new fail[64]         formatex(fail, 63, "Socket Error: %i", error)         set_fail_state(fail)         return PLUGIN_HANDLED     }         return PLUGIN_CONTINUE } public connect_bot(id) {     new message[255]     formatex(message, 254, "USER bot 0 bot :bot^nNICK bot^nJOIN #chan^n")     socket_send(socket, message, 254) } public msg(id) {     socket_send(socket, "PRIVMSG #chan :welcome message^n", 64) } public plugin_end() {     socket_send(socket, "QUIT :Plugin reset^n", 64) }
Nyuszy is offline
SonicSonedit
Veteran Member
Join Date: Nov 2008
Location: Silent Hill
Old 04-25-2011 , 14:28   Re: irc bot
Reply With Quote #2

Are you sure that you send correct packets to correct irc server adress?
Also this will probably help you: http://forums.alliedmods.net/showthread.php?t=57951
__________________

SonicSonedit is offline
Nyuszy
Senior Member
Join Date: Apr 2009
Old 04-25-2011 , 14:45   Re: irc bot
Reply With Quote #3

Quote:
FFAC/Tool support 3 im service : msn, aim and icq.
Nyuszy is offline
SonicSonedit
Veteran Member
Join Date: Nov 2008
Location: Silent Hill
Old 04-25-2011 , 14:52   Re: irc bot
Reply With Quote #4

The basis for socket coding is the same - whatever you use: aol, irc, msg - it's all same, you just send different values with socket_send. Read the goddamn FFAC/Tool code before posting sad smiles.
__________________

SonicSonedit is offline
Nyuszy
Senior Member
Join Date: Apr 2009
Old 04-25-2011 , 16:39   Re: irc bot
Reply With Quote #5

but it don't helps me...
Nyuszy is offline
Old 04-26-2011, 15:20
Nyuszy
This message has been deleted by Exolent[jNr]. Reason: Don't bump until 2 weeks have passed since last post.
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 20:01.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode