View Single Post
Plugin Info:     Modification:          Category:          Approver:   Geesu (62)
DarkSnow
Senior Member
Join Date: Oct 2005
Location: 127.0.0.1
Old 05-25-2006 , 05:14   IRC bot for Steam (chanbot)
Reply With Quote #1

ChanBot v0.2.0 - 08/22

This plugin requires the socket module to be enabled.

Also, note that you are required to modify the provided ircbot.ini file.

Functions:
This is a basic but functional plugin, that should be running for all mods.

Its sole function is to tell:
1) What game (mod) is the server running?
2) What map is currently playing?
3) How many players are currently online?

Commands:
In irc, when bot is connected - type:
!server - for list of server information

Features:
Automaticly joins #channel
Changes nick if selected nick is taken
Responds to command: !server
All variables stored in a ini file
New: framework for third party plugins

[img]http://img80.**************/img80/79/bot1tb.jpg[/img]

If you are interested in modifying this, you will find good information on the IRC protocol at:
http://www.irchelp.org/irchelp/rfc/rfc2812.txt

Cheers

Developers:
By request i have created a sort of a framework to this plugin, that works by using callfuncs.

Sample code
Code:
#include <amxmodx> #include "irc.inc" #define PLUGIN "chanbot_test" #define VERSION "1.0" #define AUTHOR "Author" public plugin_init() {     register_plugin(PLUGIN, VERSION, AUTHOR)     init_irc(PLUGIN) } public irc_in(irc_message[]) {     if (equali(irc_message, "!mycommand"))     {         irc_outmessage("test message")     } }

You have to include the irc.inc file from your plugin, and call init_irc(plugin_name[]) from plugin_init.

You also have to have a public function "irc_in(irc_message[])"

irc_in will recive the commands from irc, such as "!mycommand" or "!someothercommand".

Using irc_outmessage you can make the irc bot send public channel messages.
Attached Files
File Type: sma Get Plugin or Get Source (amxxbot.sma - 4233 views - 9.6 KB)
File Type: sma Get Plugin or Get Source (framework_sample.sma - 2990 views - 335 Bytes)
File Type: inc irc.inc (1.1 KB, 1956 views)
File Type: ini ircbot.ini (226 Bytes, 2070 views)
__________________

Last edited by DarkSnow; 08-22-2006 at 15:41.
DarkSnow is offline
Send a message via MSN to DarkSnow