small problem with rcon2irc

If you've had any problems with Nexuiz, or would like to report bugs, post here.

Moderators: Nexuiz Moderators, Moderators

Tue Feb 10, 2009 9:11 pm

  • server is up, rcon2irc is running and connected. in game msgs and scoreboard appear no problems. cannot do "nexuz: hi" and have it display in game. rcon password works fine from in game. am i missing something?
    synical
    Newbie
     
    Posts: 9
    Joined: Tue Feb 10, 2009 9:08 pm

Tue Feb 10, 2009 10:36 pm

  • synical wrote:cannot do "nexuz: hi" and have it display in game

    this has to be
    BOTNAME: text

    and there is also a config variable for other names you can use. However there were lots of changes to rcon2irc today, maybe one of the bugs was with those extra names. Not sure.. try to update
    User avatar
    esteel
    Site admin and forum addon
     
    Posts: 3924
    Joined: Wed Mar 01, 2006 8:27 am

Wed Feb 11, 2009 12:03 am

  • ok, i think i have the syntax right as far as BOTNAME: text, it just doesnt display anything in game. can i just update the rcon2irc perl script? or it a server update as well?
    synical
    Newbie
     
    Posts: 9
    Joined: Tue Feb 10, 2009 9:08 pm

Wed Feb 11, 2009 10:12 am

  • Actually i have no idea if you are using 2.4.2 or svn.. i just suggested updating the script as there was talk about problems and fixes for rcon2irc. And i use the current development version of rcon2irc without a problem. Just updating the script and the config (and reediting it) should be enough..
    Current development version of both (if the next version is out it should be better to use the one from that release though..):
    Gnah, the forum does not like to make urls out of those.. please copy/paste
    Code: Select all
    http://svn.icculus.org/*checkout*/nexuiz/trunk/server/rcon2irc/rcon2irc-example.conf
    http://svn.icculus.org/*checkout*/nexuiz/trunk/server/rcon2irc/rcon2irc.pl
    User avatar
    esteel
    Site admin and forum addon
     
    Posts: 3924
    Joined: Wed Mar 01, 2006 8:27 am

Wed Feb 11, 2009 6:10 pm

  • excellent thank you! i wll try those later today.
    synical
    Newbie
     
    Posts: 9
    Joined: Tue Feb 10, 2009 9:08 pm

Thu Feb 12, 2009 12:49 am

  • sweet you got the kinks worked out. bot now acts as gateway between irc and nex. one more question if you would.


    edit: ok scratch the command part, i figured out you have to pm it.

    also is there anyway to increase the verbosity of the bot to display deaths in irc? i'm not worried about the bot excess flooding off, i've removed its flood limits.
    synical
    Newbie
     
    Posts: 9
    Joined: Tue Feb 10, 2009 9:08 pm

Thu Feb 12, 2009 6:32 am

  • No, this is not supported, but you can easily add it. That's what its plugin interface is for. An untested example:

    Code: Select all
    sub out($$@);

    [ dp => q{^:kill:frag:(\d+):(\d+):type=(\d+):items=(\d+)([A-Z]*)(?:|(\d+)):victimitems=(\d+)([A-Z]*)(?:|(\d+))$/)} => sub {
            my ($killer, $victim, $deathtype, $items, $powerups, $runes, $victimitems, $victimpowerups, $victimrunes) = @_;
            out irc => 0, "PRIVMSG $config{irc_channel} :$store{qq{playernick_byid_$killer}} killed $store{qq{playernick_byid_$victim}}";
            return 0;
    } ],


    Note that, to turn off flood protection, you have to comment out the line

    $channels{irc}->throttle(0.5, 5);

    in rcon2irc.pl, or it'll drop lots of messages.
    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.
    User avatar
    divVerent
    Site admin and keyboard killer
     
    Posts: 3809
    Joined: Thu Mar 02, 2006 4:46 pm
    Location: BRLOGENSHFEGLE

Thu Feb 12, 2009 9:40 pm

  • fixed the regex error i got at first. there was an extra ) i believe:

    Code: Select all
    sub out($$@);



    [ dp => q{^:kill:frag:(\d+):(\d+):type=(\d+):items=(\d+)([A-Z]*)(?:|(\d+)):victimitems=(\d+)([A-Z]*)(?:|(\d+))$/} => su$

            my ($killer, $victim, $deathtype, $items, $powerups, $runes, $victimitems, $victimpowerups, $victimrunes) = @_;

            out irc => 0, 'PRIVMSG $config{irc_channel} :$store{qq{playernick_byid_$killer}} killed $store{qq{playernick_by$

            return 0;

    } ],


    after fixing the error i initially got, everything went ok. still i get no kill out put to irc. i was looking at the text when i was playing in the terminal window:

    Code: Select all
               irc << PRIVMSG #nexuiz :<synical> hm

               dp >> synical^7: hm

    unhandled: dp >> ^1[PRO]Resurrection^1 exploded

    unhandled: dp >> :kill:suicide:3:3:type=128:items=128



    looks like its grabbing the information, its just unhandled. meaning, (guessing) it doesnt know what to do with the information its been handed. i feel were real close to victory on this. :)
    synical
    Newbie
     
    Posts: 9
    Joined: Tue Feb 10, 2009 9:08 pm

Fri Feb 13, 2009 1:35 am

  • getting close, i figured instead of editing my prior post i will just continue on to a new one to show the evolution.

    i've fixed the code:

    Code: Select all
    sub out($$@);



    [ dp => q{^:kill:frag:(\d+):(\d+):type=(\d+):items=(\d+)([A-Z]*)(?:|(\d+)):victimitems=(\d+)([A-Z]*)(?:|(\d+))$} => sub$

            my ($killer, $victim, $deathtype, $items, $powerups, $runes, $victimitems, $victimpowerups, $victimrunes) = @_;

            out irc => 0, "PRIVMSG $config{irc_channel} :$store{qq{playernick_byid_$killer}} killed $store{qq{playernick_by$

            return 0;

    } ],


    now the next issue is, the bot just says "killed" instead of showing who got killed.

    i've been working with a friend of mine who is good with perl, so far this is what she has to add to it:

    [7:59] (Estella) # chat: Nexuiz server -> IRC channel, nick set
    [7:59] (Estella) [ dp => q{:join:(\d+):(\d+):([^:]*):(.*)} => sub {
    [7:59] (Estella) my ($id, $slot, $ip, $nick) = @_;
    [7:59] (Estella) $nick = color_dp2irc $nick;
    [7:59] (Estella) $store{"playernick_byid_$id"} = $nick;
    [7:59] (Estella) $store{"playerip_byid_$id"} = $ip;
    [7:59] (Estella) $store{"playerslot_byid_$id"} = $slot;
    [7:59] (Estella) $store{"playerid_byslot_$slot"} = $id;
    [7:59] (Estella) return 0;
    [7:59] (Estella) } ],
    [7:59] (Estella) this is where it's storing the values
    [7:59] (Estella) but if the script is started after the fact then users are already on the server
    [7:59] (Estella) thus it has no stored values
    [8:02] (Estella) it's missing the code for kill:frag

    hope this helps.
    synical
    Newbie
     
    Posts: 9
    Joined: Tue Feb 10, 2009 9:08 pm

Fri Feb 13, 2009 4:49 pm

  • Yes, wait for a map change, then it'll work. These values aren't valid before.
    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.
    User avatar
    divVerent
    Site admin and keyboard killer
     
    Posts: 3809
    Joined: Thu Mar 02, 2006 4:46 pm
    Location: BRLOGENSHFEGLE

Sat Feb 14, 2009 6:12 am

  • ok the bot just outputs:

    [1:05] @(nexuiz) killed
    [1:05] @(nexuiz) killed
    [1:05] @(nexuiz) killed

    etc. no player names, just "killed"

    here is what i am seeing in a terminal window when running the perl script:
    Code: Select all
    unhandled: dp >> ^1[PRO]Panic^1 was telefragged by [PRO]Sensible

               irc << PRIVMSG #nexuiz : killed

               dp >> :kill:frag:2:5:type=10001:items=1:victimitems=8


    looks like its grabbing part of it, but not all of it. this is after a map change like you suggested before.

    by the way, thanks for replying and thanks for the help. i understand this isnt supported.
    synical
    Newbie
     
    Posts: 9
    Joined: Tue Feb 10, 2009 9:08 pm

Sat Feb 14, 2009 2:17 pm

  • Try replacing

    $store{qq{playernick_byid_$killer}}

    by

    @{[ $store{'playernick_byid_' . $killer} ]}

    Maybe Perl simply does odd parsing there.
    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.
    User avatar
    divVerent
    Site admin and keyboard killer
     
    Posts: 3809
    Joined: Thu Mar 02, 2006 4:46 pm
    Location: BRLOGENSHFEGLE

Sun Feb 15, 2009 7:11 am

  • hm ok did just that, for the $killer and $victim part.

    [1:54] @(nexuiz) {[ ]} killed {[ ]}
    [1:54] @(nexuiz) {[ ]} killed {[ ]}
    [1:54] @(nexuiz) {[ ]} killed {[ ]}

    lol getting closer!

    Code: Select all
    sub out($$@);



    [ dp => q{^:kill:frag:(\d+):(\d+):type=(\d+):items=(\d+)([A-Z]*)(?:|(\d+)):victimitems=(\d+)([A-Z]*)(?:|(\d+))$} => sub {

            my ($killer, $victim, $deathtype, $items, $powerups, $runes, $victimitems, $victimpowerups, $victimrunes) = @_;

            out irc => 0, "PRIVMSG $config{irc_channel} : {[ $store{'playernick_byid_' . $killer} ]} killed {[ $store{'playernick_byid_' . $victim} ]}";

            return 0;

    } ],
    synical
    Newbie
     
    Posts: 9
    Joined: Tue Feb 10, 2009 9:08 pm

Sun Feb 15, 2009 8:49 am

  • there should be an @ before {[
    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.
    User avatar
    divVerent
    Site admin and keyboard killer
     
    Posts: 3809
    Joined: Thu Mar 02, 2006 4:46 pm
    Location: BRLOGENSHFEGLE

Mon Feb 16, 2009 5:29 am

  • Code: Select all
    sub out($$@);



    [ dp => q{^:kill:frag:(\d+):(\d+):type=(\d+):items=(\d+)([A-Z]*)(?:|(\d+)):victimitems=(\d+)([A-Z]*)(?:|(\d+))$} => sub {

            my ($killer, $victim, $deathtype, $items, $powerups, $runes, $victimitems, $victimpowerups, $victimrunes) = @_;

            out irc => 0, "PRIVMSG $config{irc_channel} : @{[ $store{'playernick_byid_' . $killer} ]}  killed @{[ $store{'playernick_byid_' . $victim} ]}";

            return 0;

    } ],



    [12:23] @(nexuiz) killed
    [12:23] @(nexuiz) killed
    [12:23] @(nexuiz) killed

    a simliar result.
    synical
    Newbie
     
    Posts: 9
    Joined: Tue Feb 10, 2009 9:08 pm



Return to Nexuiz - Support / Bugs




Information
  • Who is online
  • Users browsing this forum: No registered users and 1 guest