Jump to content

[REL] IRC Server Echo


VRocker

Recommended Posts

  • Replies 65
  • Created
  • Last Reply

Top Posters In This Topic

VRocker - just one small request:

please add a "To" param to the PrivMsg event, this would either be the channel name, or the bots name (for PM), because at the moment its impossible for the LUA scripts to dectet if a message was either a PM or a global in the channel.

Also, last thing.

I've noticed that checking to see if a nick is a Op, or a owner etc etc does not work for newly set nicks.

For example:

1) bot joins channel

2) I join channel, chanserv sets my mode - lovely

3) i type in a command that uses the check for Owner

4) it tells me im not an owner

^^ You can fix this by getting the bot to part and rejoin the channel, the reason is that any nicks that were in the channel before the bot came in are reconised and saved with their permissions, and users that join after the bot do not get their permissions saved thus the commands dont work aginst them.

Hope u get internets soon

Cya bud.

Link to comment

I still cant get this working after about 2 days solid at it.

We have an irc echo for our race server which works great. Now we use uk.quakenet.org but this client refuses to connect to it. It seems to try to connect to something else :?

I have tried and tried again yet nothing.

Interestingly enough i made it join another irc network freenode or something which banned me straight away :?

Keep getting

[00:05:20] Starting IRCEcho 
[00:05:20] Connecting to IRC (irc.quakenet.org:6667) 
[00:05:20] start: Resource 'IRCEcho' started 
[00:05:22] IRC Notice <> underworld1.no.quakenet.org: Highest connection count: 10815 (10814 clients) 
[00:05:22] IRC Notice <> underworld1.no.quakenet.org: on 1 ca 1(4) ft 20(20) 

Any ideas what's going on with it?

Link to comment

I was wondering if anyone knows of a way to be able to kick players / ban etc through the IRC. I wasnt sure if there would a way at all. I am not very good with IRC, I can script fine. I just lack the knowledge of how I could check for admin on the IRC.

Link to comment
VRocker - just one small request:

please add a "To" param to the PrivMsg event, this would either be the channel name, or the bots name (for PM), because at the moment its impossible for the LUA scripts to dectet if a message was either a PM or a global in the channel.

Also, last thing.

I've noticed that checking to see if a nick is a Op, or a owner etc etc does not work for newly set nicks.

For example:

1) bot joins channel

2) I join channel, chanserv sets my mode - lovely

3) i type in a command that uses the check for Owner

4) it tells me im not an owner

^^ You can fix this by getting the bot to part and rejoin the channel, the reason is that any nicks that were in the channel before the bot came in are reconised and saved with their permissions, and users that join after the bot do not get their permissions saved thus the commands dont work aginst them.

Hope u get internets soon

Cya bud.

Thanks for letting me know about the status issue. That part was kinda rushed so it wasn't tested very well...

About the PM thing, i think the first param (labelled as channel) will say the persons nickname if it was a PM. not 100% on that though.

The status issue is now fixed for both Windows and Linux. Just need to update your DLL/SO with the attached file(s):

http://liberty-unleashed.co.uk/MTA/ml_ircecho.zip

Apologies for not releasing this update any sooner and not really touching this module much. Been a tad busy lately

Link to comment

Even with version 2.1, I'm seeing the same status problem AlienX was describing where users whose mode changes (or who join) after the bot joins the channel are still recognized with the old mode. For my purposes I've hacked in my own priv tracking by sending a NAMES request to the server when modes or joins happen and use irc_onRaw to parse out the updated privs from that.

I've also been experimenting with the callbacks and have found the following problems and/or documentation errors:

irc_onPrivMsg( nick, text ) - Called when somebody speaks in the current channel or PMs the bot

As alluded to in VRocker's last post (and as seen in the default echo script), this actually has 3 parameters and the first one is the receiver (either channel name or nickname) so an example usage would be:

function irc_onPrivMsg( receiver, senderNick, message ) 
   outputDebugString("[PRIVMSG to "..receiver.."] <"..senderNick.."> "..message) 
end 

irc_onNotice( nick, text ) - Called when the bot is sent a notice

Again, this really will send 3 parameters (i.e. only the documentation is wrong) but in this case the sender is first so here is an example:

function irc_onNotice( senderNick, receiver, message ) 
   outputDebugString("[NOTICE to "..receiver.."] <"..senderNick.."> "..message) 
end 

irc_onJoin( nick, channel ) - Called when a user enters the channel

In this case, the order of the parameters is switched; channel name is actually first and it also still contains the leading colon from the raw message so I use something like the following:

function irc_onJoin( channel, joiningNick ) 
   channel = string.sub(channel, 2) -- strip leading colon 
   outputDebugString("[iRC] "..joiningNick.." joined "..channel) 
end 

irc_onPart( nick, channel ) - Called when a user leaves the channel

I can't ever get this callback to trigger at all anymore so instead I just deal with it in irc_onRaw and parse out the necessary bits myself. This may be partly my problem though because my server logs seem to indicate that it has been called at least a couple times in the past with the default echo script although the nickname has never displayed.

irc_onQuit( nick ) - Called when a user quits IRC

This one does trigger when a user quits, but there is a problem with the passed data. Usually the empty string is passed but sometimes there seems to be garbage data(control-characters and such); either way, I never see the nick. So, again, I deal with it in irc_onRaw.

irc_onNickChange( oldNick, newNick ) - Called when somebody changes their nickname

Same problem here as with onJoin; the parameters are switched and newNick contains the leading colon. So I use something like this:

function irc_onNickChange( newNick, oldNick ) 
   newNick = string.sub(newNick, 2) -- strip leading colon 
   outputDebugString("[iRC] "..oldNick.." now known as "..newNick) 
end 

irc_onRaw( text ) - Called when an unrecognised IRC command is recieved

This is simply a documentation issue: irc_onRaw is called on *every* IRC message, not just unrecognized ones. However, this is a good thing because it allows you get extra data the callbacks don't supply (like user@host in addition to nicknames) if for some reason you want to access it.

Thanks for all your work on this; also, any chance the source to the module will be released?

Link to comment
  • 4 weeks later...
  • 1 month later...

i just thaught of another thing that is Deffanatly needed.

if i Mute somone for spamming in my server,

thier text no longer comes up in the chatbox, but still gets relayed to the IRC channel.

can this be made so if a player is muted, it does not relay the text to the IRC.

Link to comment
  • 1 year later...

This is kind of an ancient topic bump, but i have been using the windows version of this plugin for a while with no problems at all. however i recently changed to using a linux OS (Fedora 11) and am now finding that the ml_ircecho.so file is causing the server to crash at startup with an error message of "Segmentation fault".

Is this a repairable bug or something up with the setting at my side

Any help appreciated :)

Huperman.

Link to comment
  • 1 month later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.

×
×
  • Create New...