Raised This Month: $ Target: $400
 0% 

irc bot


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
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
 



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