Raised This Month: $51 Target: $400
 12% 

[INPUT REQUIRED] IRC Relay


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Olly
Senior Member
Join Date: Mar 2007
Location: UK
Old 05-17-2007 , 12:34   [INPUT REQUIRED] IRC Relay
Reply With Quote #1

HIHI,
Some of you know i have been working on an IRC 'Relay' for sourcemod that allows you to communicate to the players from irc, and from game to irc. I have started building in extra stuff to make this plugin more worth while. Curretly the features of the relay are:

!msg !allchat !auth !ask !magic8 !as !pmsg !relayhelp !triggers !relayversion !players !scores !playerinfo !serverinfo !join !rcon !kickplayer !banplayer !nick !masterchannel");
  • Messaging the server from IRC
  • Messaging individual players from IRC
  • Messaging IRC channel from game
  • Ability to view all game chat messages from irc
  • Authentication with AuthServ (GameSurge only for now)
  • Player list in IRC with or without Scores
  • Detailed player info in IRC
  • Server info
  • Rcon commands
  • Kick player
  • Ban Player
  • Displays when a player is banned
  • 8ball (better than chanserv's one )
  • Multiple channel support (bot can be in upto 10 channel)
  • Multiple server support (can have multiple relays in your channel at once, and they work together)
They are the main features of the bot so far. Some extras I added are:
  • Ability to define groups of relays for sets of servers, For Example In GC, we can use '!msg #eu Hi Europeans ' which will send that message only to the european servers. Or '!serverinfo #dod' which will show the server status for the day of defeat servers. You can define upto 10 groups per bot
  • Ability for other plugins to send info to your IRC channel. For example FlyingMongooses upcoming plugin (ATAC) sends the channel a message when someone is kicked/banned for too many TK's
  • Ability for other plugins to 'register' new IRC commands and set a callback function for when that command is triggered. For example in ATAC you will soon be able to say something like '!tkcount Olly' which will show how many TK's I have. Using command registration, the plugin writer can define any command (apart from existing) they want, and set the callback for the plugin once the command has been run. The relay will then save upto 10 arguments that went along with the command and they will be accessable from the callback.
What i am asking is, is there any other features you would like to see, either for the usage side of the plugin, or the plugin natives that i have created for it. Or any extra stuff you think will be usefull in this plugin.

Here is a copy of the ircrelay.inc file to show the natives you can use:

Code:
#if defined _ircrelay_included
  #endinput
#endif
#define _ircrelay_included

#define CHAN_MASTER 1
#define CHAN_NOT_MASTER 2
#define CHAN_ALL 3

functag IrcCallbackFunc public();

/*********************************************************
 * Sends a message to a channel
 *
 * @param    destination            Which channels to send the message to.
                        CHAN_MASTER - Send message to master channel
                        CHAN_NOT_MASTER - Send to all channels but master
                        CHAN_ALL - Send message to all channels.
 * @param    String:message[]        The message to send
 * @param    ...                Format Arguments
 * @noreturn        
 *********************************************************/
native IrcMessage(destination, String:message[], any:...);


/*********************************************************
 *  This native will allow external plugins to register their own command
 *
 * @param    String:command[]        The command to add eg: "!mycommand"
 * @param    Function:callback        The callback for once that command has been run on the irc server
 * @param    permissions            Which channel can this be run from [CHAN_MASTER|CHAN_NOT_MASTER|CHAN_ALL]
 * @noreturn        
 *********************************************************/
native RegisterIrcCommand(String:command[], permissions, IrcCallbackFunc:callback);


/*********************************************************
 *  This native return the amount of arguments are in the command
 *
 * @return the amount of arguments        
 *********************************************************/
native IrcGetCmdArgc();


/*********************************************************
 *  This native will get the value of one of the commands
 *
 * @param    argnum            The argument number to get
 * @param    maxlen            The max length for the buffer
 * @param    String:argv[]        The place to store the arg string
 * @noreturn        
 *********************************************************/
native IrcGetCmdArgv(argnum, maxlen, String:argv[]);


//Yarr!
Olly is offline
Send a message via MSN to Olly
sessus
Senior Member
Join Date: May 2006
Old 05-17-2007 , 23:37   Re: [INPUT REQUIRED] IRC Relay
Reply With Quote #2

That sounds heaps promising and I would definitely implement it on my 10 or so servers if it came out.

Just wondering though: Would there be a possibility to create a banned user list with the IRC Relay so that the channel bot checks joining members if they were banned on other servers or not and subsequently bans on the current server if required?
sessus is offline
FlyingMongoose
Veteran Member
Join Date: Mar 2004
Old 05-17-2007 , 23:49   Re: [INPUT REQUIRED] IRC Relay
Reply With Quote #3

I don't think functionality like that would coincide with that functionality.

Something along the lines of a "global banlist" or a port of amxbans (for and SQL set up) would probably be best.
FlyingMongoose is offline
sessus
Senior Member
Join Date: May 2006
Old 05-18-2007 , 03:30   Re: [INPUT REQUIRED] IRC Relay
Reply With Quote #4

ok thanks. 'global banlis' seems to be a dead project but an amxbans port would be heaps hice.

btw: When are you planning to release all this?
sessus is offline
tcviper
Veteran Member
Join Date: Oct 2005
Location: Netherlands
Old 05-18-2007 , 03:42   Re: [INPUT REQUIRED] IRC Relay
Reply With Quote #5

there will be an amxbans version on source soon ;)
__________________
tcviper is offline
Send a message via MSN to tcviper
Olly
Senior Member
Join Date: Mar 2007
Location: UK
Old 05-18-2007 , 05:36   Re: [INPUT REQUIRED] IRC Relay
Reply With Quote #6

Quote:
Originally Posted by sessus View Post
ok thanks. 'global banlis' seems to be a dead project but an amxbans port would be heaps hice.

btw: When are you planning to release all this?
Well, i dont really have a time at the moment of when its going to be released, but i guess it will be when it is done (~1 - 2 weeks probobly)

Olly is offline
Send a message via MSN to Olly
Ravager01
Member
Join Date: Jul 2006
Old 05-18-2007 , 07:08   Re: [INPUT REQUIRED] IRC Relay
Reply With Quote #7

A couple things you could implement:
  • Configurable bot trigger (Ex: one bot using @, and another using >)
  • Configurable message output (Ex: chat-only, frags-only)
  • IRC Flood protection (Delay between messages)
  • Admin Request/Paging
  • Global Ban command (sending ban to all available bots or to multiple groups)
Ravager01 is offline
FlyingMongoose
Veteran Member
Join Date: Mar 2004
Old 05-18-2007 , 07:17   Re: [INPUT REQUIRED] IRC Relay
Reply With Quote #8

Flood protection is done and work, the triggers are done in a per-server method

all IRC commands are shared but each bot will have a "define-able" trigger. For example we have multiple US and EU servers

Lets say I want to see players in the euro-server #1
!players eu.css1

Or how about US?
!players us.css1

that's just how we have it set up

Group management (groups defineable)
You can also define bots as part of groups, so lets say I have a few CSS servers all defined under the group "CSS"

!players #CSS
and you can have multiple groups.

And if you mean admin request/paging, you can already type "/irc [messagehere]" in game.
this sends to the "master channel"

You can also define a master channel (we have a private staff channel) and a normal channel, normal channel only info commands are allowed, master channel accepts control commands.

If you like you can even turn on an "allchat" command per trigger which recieves all chat and sends to the master channel.

This has been under testing for a while.

There's a !kickplayer and a !banplayer command so you could create an "all" group for your bots put them in it, and just do something along the lines of
!banplayer #all [player]


There's even a special surprise in there that we thought would be fun to have...

So ravager...anything else? :p

This bot is extremely configureable. It was created with multiple channels and multiple servers in mind

Oh yes, almost forgot. You also can define a specific bot as "master" bot. This is the bot that will respond to information commands for the bot itself.

For example:
!relayhelp - The command displays some commands and examples

Only the master bot will respond to this command.

Last edited by FlyingMongoose; 05-18-2007 at 07:42.
FlyingMongoose is offline
Ravager01
Member
Join Date: Jul 2006
Old 05-18-2007 , 11:44   Re: [INPUT REQUIRED] IRC Relay
Reply With Quote #9

Very nice. ^_^
Ravager01 is offline
Olly
Senior Member
Join Date: Mar 2007
Location: UK
Old 05-18-2007 , 12:35   Re: [INPUT REQUIRED] IRC Relay
Reply With Quote #10

oh noes, now i dont have anything to reply too ^^

But thanks FlyingMongoose, you saved me typing all of that out

Just one small note, all bots are automaticaly part of the '#all' group ;) - Just because all bots should be in it

At the moment permissions on what comamds can be run on the bot, is defined on which channel the command comes from; the 'Master channel' but soon, i will enable you to set the bot up so that IRC user permissions come into play. For example;

@ - Could do command 1, command 2, and, command 3
+ - Could do command 2, command 3
anyone - Could do command 3

But i think ill release before i add that, just to check the stability of the plugin.
Olly is offline
Send a message via MSN to Olly
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 09:02.


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