IRC gateway - a new way

Developer discussion of experimental fixes, changes, and improvements.

Moderators: Nexuiz Moderators, Moderators

IRC gateway - a new way

Postby divVerent » Mon Jul 09, 2007 4:03 pm

Because my last attempt at an IRC gateway was "a bit" hard to install and to change (the gateway started the server and communicated using stdin/stdout, so one couldn't change the gateway while the server was running), I made a new one. This time, I added a feature to the engine to support it:

New cvar: log_dest_udp - contains a space separated list of IP addresses and ports to send all console output to (in the same format as QW rcon data)

Basically, my IRC gateway now is an external process that uses rcon to retrieve log_dest_udp from the server, adds itself to the list and uses rcon to send the changed value to the server (yes, this does have a race condition, but should usually not be an issue... as a workaround, one can regularily request that cvar and add oneself to it when needed, but my gateway is not doing this yet). Then it can see all console messages, and use rcon to talk to the server. So setting it up is much easier now - just point it to some Nexuiz server with a rcon password, and that's it.

It already supports color codes, special fonts, chat in both direction, and a somewhat clumsy but simple way to add plugins. The RBI KH server already uses the new gateway (that you can watch it on irc.oftc.net, #Nexuiz-Pwayers isn't a secret any more anyway). A newly added feature is notification about free player slots.

I'll release it shortly after the next Nexuiz release, which will be a minor one and quite soon.
1. Open Notepad
2. Paste: ÿþMSMSMS
3. Save
4. Open the file in Notepad again

You can vary the number of "MS", so you can clearly see it's MS which is causing it.
divVerent
Site admin and keyboard killer
 
Posts: 3809
Joined: Thu Mar 02, 2006 4:46 pm
Location: BRLOGENSHFEGLE

Postby GreEn`mArine » Mon Jul 09, 2007 5:21 pm

That sounds very interesting, indeed. Just make sure to wait for Mr ATI Victim ™ to check out the update before its release ;)
IRC quote:
[kojn] I've been coming a bit more recently
[kojn] she took it the dirty way
GreEn`mArine
Forum addon
 
Posts: 1509
Joined: Tue Feb 28, 2006 9:33 pm
Location: Germany

Postby divVerent » Fri Jul 13, 2007 11:32 am

First test version of the gateway:

http://hagger.rbi.informatik.uni-frankf ... ew.tar.bz2

Not licensed for anything but personal use with or without modification yet, but it will be either BSD, GPL2 or GPL3 licensed, I have not decided yet. Note that it requires a DP build from svn - it does NOT work with Nexuiz 2.3!
1. Open Notepad
2. Paste: ÿþMSMSMS
3. Save
4. Open the file in Notepad again

You can vary the number of "MS", so you can clearly see it's MS which is causing it.
divVerent
Site admin and keyboard killer
 
Posts: 3809
Joined: Thu Mar 02, 2006 4:46 pm
Location: BRLOGENSHFEGLE

Postby GreEn`mArine » Fri Jul 13, 2007 12:54 pm

wow I really like these closed open-source perl scripts :o
Closed, because a usual programmer who doesn't know perl won't get what is happening in your script.
IRC quote:
[kojn] I've been coming a bit more recently
[kojn] she took it the dirty way
GreEn`mArine
Forum addon
 
Posts: 1509
Joined: Tue Feb 28, 2006 9:33 pm
Location: Germany

Postby KadaverJack » Fri Jul 13, 2007 2:30 pm

GreEn`mArine wrote:wow I really like these closed open-source perl scripts :o
Closed, because a usual programmer who doesn't know perl won't get what is happening in your script.

Even perl programmers won't understand perl scripts written by someone else. That's what perl was designed for ;)
KadaverJack
Site admin and forum addon
 
Posts: 1102
Joined: Tue Feb 28, 2006 9:42 pm

Postby Dokujisan » Fri Jul 13, 2007 2:35 pm

Can someone explain how exactly this works?

I know what a gateway is.
I know what IRC is.

What does this thing do?
Dokujisan
Forum addon
 
Posts: 1199
Joined: Sat Oct 07, 2006 4:31 pm
Location: Louisville, Kentucky

Postby tChr » Fri Jul 13, 2007 3:16 pm

my guess would be that the term gateway is that this scripts offer a way for the nexuis server to communicate with the script, which again communicates with IRC.
the spice extend life!
the spice expand conciousness!
the spice is vital to space travel!
sooooo.. tell me what you want, waht you really-really want
I will proceed directly to the intravenous injection of hard drugs, please.
tChr
Forum addon
 
Posts: 1501
Joined: Tue Feb 28, 2006 9:11 pm
Location: Trondheim, Norway

Postby Dokujisan » Fri Jul 13, 2007 3:25 pm

I saw the one example where slot openings on the server would be announced in IRC.

So there would be a bot in IRC that communicates with the Nexuiz server?
Dokujisan
Forum addon
 
Posts: 1199
Joined: Sat Oct 07, 2006 4:31 pm
Location: Louisville, Kentucky

Postby esteel » Fri Jul 13, 2007 7:37 pm

Yeah.. the old irc gateway would connect to a server/channel and just post chat from the server and some important news like new maps to the channel. And allow people to 'say' stuff to people on the server.
Useful to keep a watchful eye on the server.
esteel
Site admin and forum addon
 
Posts: 3924
Joined: Wed Mar 01, 2006 8:27 am

Postby Dokujisan » Fri Jul 13, 2007 7:52 pm

Whoa. People in IRC could talk on the Nexuiz server?
How would they do that? Would it be like sending a command to a bot?

That's very interesting
Dokujisan
Forum addon
 
Posts: 1199
Joined: Sat Oct 07, 2006 4:31 pm
Location: Louisville, Kentucky

Next

Return to Nexuiz - Development

Who is online

Users browsing this forum: No registered users and 1 guest

cron