Raised This Month: $ Target: $400
 0% 

IRC Relay for SourceMod 2.5.0


Post New Thread Reply   
 
Thread Tools Display Modes
DataMatrix
Senior Member
Join Date: Aug 2005
Location: UK, Liverpool
Old 09-20-2008 , 23:41   Re: IRC Relay (v2.1.0) UPDATED!
Reply With Quote #241

L 09/21/2008 - 05:04:46: SourceMod error session started
L 09/21/2008 - 05:04:46: Info (map "zm_warehouse") (file "errors_20080921.log")
L 09/21/2008 - 05:04:46: [SM] Native "CreateNative" reported: Fatal error creating dynamic native!
L 09/21/2008 - 05:04:46: [SM] Displaying call stack trace for plugin "irc-relay-core.smx":
L 09/21/2008 - 05:04:46: [SM] [0] Line 176, irc-relay-core.sp::AskPluginLoad()

Running Linux on Zombie Master.
DataMatrix is offline
Send a message via MSN to DataMatrix
Atreus
SourceMod Donor
Join Date: Apr 2005
Location: San Diego, CA
Old 09-21-2008 , 02:01   Re: IRC Relay (v2.1.0) UPDATED!
Reply With Quote #242

The plugin was on my computer, because no one replied and I forgot about posting it [img]http://img241.**************/img241/1939/xpyq5.gif[/img]

I also decided to make it easier for other people to integrate into their installs. I initially hacked up the "irc-admin" plugin. It was really just pasting in about 5-6 lines and one big block of code, but not everyone is a coder, so I wanted to make it as easy as possible and separated it into its own file.

IRC Relay sm_Commands Plugin
Safely execute sourcemod commands on your server using IRC Relay

Contents - What you'll see attached is:
  • A Zip file with everything you could want for the plugin, as I'll explain below.
  • The main SMX file and the Whitelist.cfg -- the bare minimum for running the plugin.

Detailed Explanation:
  • irc-sourcemod.smx works by taking a command you pass your bot (!GameBot.sm command otherstuff) and runs it as an RCON command, but first passes it through a configurable whitelist file (Whitelist.cfg) to make sure that no bad commands get sent through. In short, you, as the administrator get to choose what is allowed. In the future, I hope to modify IRCRelay so that it hooks up with the admins.cfg and doesn't even need the Whitelist, but that's a ways off.

    As a note, in the zip I have also included the source and compiled version of an edited irc-relay-core. The only difference between this and the new one is that I have included irc-sourcemod in the list of plugins that are reloaded when irc-relay-core is reloaded (line 133), so that everything is refreshed. Whether you use it or not is up to you.

    Note: This was compiled using the 1.1 branch, since that's what I use. If anyone finds that poses a problem for this simple of a plugin, let me know and I'll download 1.0.4 and compile it against that

Zip Contents:
  • The irc-sourcemod.smx / source file
  • The Whitelist.cfg file
  • The altered irc-relay-core.smx / source file

How to install:
  • Using The Zip-
    • Extract to addons folder, or pick and choose which parts you want (see "Detailed explanation")
    • Edit the Whitelist.cfg if desired
  • Bare Minimum Install-
    • Place irc-sourcemod.smx into /sourcemod/plugins/
    • Place Whitelist.cfg into /sourcemod/config/ircrelay/ (edit if desired)
Usage Examples:
  • !GameBot.sm mute AnnoyingPlayer
  • !GameBot.sm map cp_dustbowl

Future Plans:
  • Modify IRCRelay so that it hooks up with the admins.cfg
  • Have the plugin return actual server feedback, in case the feedback is something like "player not found"

Many, many thanks to r3recon for assisting me when writing this. I haven't done that much SourceMod coding, so this was a learning experience.
Attached Files
File Type: zip irc-sourcemod.zip (37.7 KB, 234 views)
File Type: smx irc-sourcemod.smx (2.8 KB, 227 views)
File Type: cfg Whitelist.cfg (365 Bytes, 229 views)

Last edited by Atreus; 09-21-2008 at 02:08.
Atreus is offline
Send a message via AIM to Atreus Send a message via MSN to Atreus
mabu
Member
Join Date: Dec 2006
Old 09-22-2008 , 10:37   Re: IRC Relay (v2.1.0) UPDATED!
Reply With Quote #243

Hello can someone help me ?

Messages from Gameserver to the IRC works fine.

if i use a cmd like a, msg, etc. i get this message everytime:
"You don't have the required access level for this command."

also if i want to ad a user !

my Relay s name is :
mysekbot

so i tried "!mysekbot.adduser johndoe 123456 300"
and i got again:
You don't have the required access level for this command.

And if i try this:
"!mysekbot.a"
i got
You need to auth first.

i dont understand the order.
mabu is offline
recon0
Veteran Member
Join Date: Sep 2007
Location: US
Old 09-22-2008 , 17:45   Re: IRC Relay (v2.1.0) UPDATED!
Reply With Quote #244

Quote:
Originally Posted by mabu View Post
Hello can someone help me ?

Messages from Gameserver to the IRC works fine.

if i use a cmd like a, msg, etc. i get this message everytime:
"You don't have the required access level for this command."

also if i want to ad a user !

my Relay s name is :
mysekbot

so i tried "!mysekbot.adduser johndoe 123456 300"
and i got again:
You don't have the required access level for this command.

And if i try this:
"!mysekbot.a"
i got
You need to auth first.

i dont understand the order.
Quote:
Originally Posted by Olly View Post
  1. in the server console, run the following command
    1. irc_addroot <rcon-password> <username> <password>
    2. Ofcourse replacing <..> with the real data (The only reason RCON password is required, is so that only the root admin can run this, and not anyone with lower access who has access to the relay's RCON command. It is not saved anywhere, its just used as a comparrison.
__________________
recon0 is offline
mabu
Member
Join Date: Dec 2006
Old 09-23-2008 , 02:38   Re: IRC Relay (v2.1.0) UPDATED!
Reply With Quote #245

I already did that.
What comes to it?
mabu is offline
sLuGo
Member
Join Date: Mar 2008
Old 09-23-2008 , 12:25   Re: IRC Relay (v2.1.0) UPDATED!
Reply With Quote #246

Found the fixed smx to fix the double posting!

Also, i have irc_addroot password(rcon) username(tried a few) and password(also tried a few) i always get this error...

«12:17:06» -tf2rely- Successfully Authed.
«12:17:06» -tf2rely- Error: PRIMARY KEY must be unique

Any help?

Last edited by sLuGo; 09-23-2008 at 12:29.
sLuGo is offline
Atreus
SourceMod Donor
Join Date: Apr 2005
Location: San Diego, CA
Old 09-24-2008 , 22:56   Re: IRC Relay (v2.1.0) UPDATED!
Reply With Quote #247

I'm starting to think that IRC Relay may be responsible for the crashes my server's been having :/ I think I'll try updating SourceMod first, but if that doesn't fix it I may have to stop using it until Olly finally updates it :X
Atreus is offline
Send a message via AIM to Atreus Send a message via MSN to Atreus
Atreus
SourceMod Donor
Join Date: Apr 2005
Location: San Diego, CA
Old 09-29-2008 , 05:25   Re: IRC Relay (v2.1.0) UPDATED!
Reply With Quote #248

I just tried disabling this. We'll see if my crashes continue. I've gotten repeated crashes, preceded by errors from irc-access.smx. If the dev ever returns, or anyone wants to offer assistance, I'll paste my log.
Atreus is offline
Send a message via AIM to Atreus Send a message via MSN to Atreus
nbtc971
Senior Member
Join Date: Sep 2008
Old 09-30-2008 , 16:35   Re: IRC Relay (v2.1.0) UPDATED!
Reply With Quote #249

I just installed this and it appears to be working however when someone in-game chats, in the irc channel there name is in white font on a white background so you can't see the name. I have irc_color 1 set. I also have channel mode -c so color should be allowed. Any help?

*UPDATE* i set irc_color to 0 and now i can read the name but i won't be able to tell what teams anyone is on.. still need help thanks.

Last edited by nbtc971; 09-30-2008 at 16:39.
nbtc971 is offline
Ska
Junior Member
Join Date: Sep 2008
Old 10-07-2008 , 12:38   Re: IRC Relay (v2.1.0) UPDATED!
Reply With Quote #250

I have the same as some people before

Quote:
L 09/21/2008 - 05:04:46: [SM] Native "CreateNative" reported: Fatal error creating dynamic native!
L 09/21/2008 - 05:04:46: [SM] Displaying call stack trace for plugin "irc-relay-core.smx":
L 09/21/2008 - 05:04:46: [SM] [0] Line 176, irc-relay-core.sp::AskPluginLoad()
if change map also this occures

Quote:
<date-time there> [irc-relay-core.smx] socket error 5 <errno 10022>
I've installed plugin following the instructions. Bot connects to the irc-server, but doesnt join on channels (channels.txt tuned). Also I cant send any command to server through it (tryed through private).

Explain please this: irc_addroot <rcon-password> <username> <password>

whos username and password i should type in. Bots nickname and irc-server's password (theres no password on this server) that i've set in ircrelay.cfg or maybe nickname and ircpassord of user that would be able to set user levels on relay ? I cant this figure out.

This is my ircrelay.cfg

Quote:
//********************************************* ************
//* IRC Relay Core
//********************************************* ************
irc_server "172.20.0.252"
irc_port 6667
irc_password ""
irc_nickname "tf2bot"

// NAME CANNOT CONTAIN SPACES, OR QUOTES (This will be the bot trigger too!)
irc_name "tf2bot"

// The delay from each message dispatch from the message queue
irc_flood_limit 0.5

// Group list for triggers
irc_trigger_groups "tf2"

// The type of channel to send /irc messages from in-game to
// * 1 = Public Channels
// * 2 = Private Channels
// * 3 = Both types
irc_relay_replytype 2

// Display raw IRC data in console, and log files
irc_debug 1

// Enable sending of colour codes
irc_color 1

// Location of the channel, and mod config files (Do not change unless you know what you are doing! - Must end with /)
irc_config_dir "configs/ircrelay/"


//********************************************* ************
//* Authentication Module
//********************************************* ************
// The auth string to send (Dont remove %s, that will be replaced by username/pass)
// GameSurge (ChanServ): AUTHSERV AUTH %s %s
// QuakeNet (Q): PRIVMSG [email protected] :auth %s %s
irc_auth_string "AUTHSERV AUTH %s %s"

// AuthServ login details (optional)
irc_auth_username ""
irc_auth_password ""


//********************************************* ************
//* Chat Relay Module
//********************************************* ************
// Show ingame chat in IRC (1 = on, 0 = off)
irc_show_chat 1

// The type of channel to send ingame chat messages from in-game to
// * 1 = Public Channels
// * 2 = Private Channels
// * 3 = Both types
irc_chat_replytype 2


//********************************************* ************
//* Sets the access levels required to run each command (0-300)
//********************************************* ************
// Add User
irc_xs_adduser 300

// Make the relay speak in the channel
irc_xs_say 300

// Make the relay reload a module (SHOULD BE 300!)
irc_xs_reload 300

// Get player list
irc_xs_players 0

// Get information on a player
irc_xs_playerinfo 0

// Send a message to everyone in the server
irc_xs_msg 200

// Makes the relay perform an action (/me)
irc_xs_act 200

// Makes the relay perform an action (/me)
irc_xs_act 200

// Send a message to one player in the server
irc_xs_page 100

// Make the relay join a new channel
irc_xs_join 300

// Make the relay part from a channel
irc_xs_part 300

// == ADMIN COMMANDS ==
// Kick a player from the server
irc_xs_kick 150

// Bans a player from the server
irc_xs_ban 160

// Executes a command on the server (RCON)
irc_xs_rcon 250

// Set ingame chat to be redirected to IRC
irc_xs_setchat 100
Any help on this...

Last edited by Ska; 10-07-2008 at 12:53.
Ska is offline
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 22:43.


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