Author Topic: !vote, !rules, and other commands on my server -- custom console commands  (Read 10015 times)

sk89q

  • Global Moderator
  • Autococker
  • Posts: 1049
I'm testing out custom console commands on one of my Paintball servers. I made no modification to the game source.

paintball2://64.27.12.194:27921

* It works most of the time, but occasionally the client may refuse all the print messages from the server
* Name changes will stop it from working for you
* If your name ends in :, you're just out of luck
* A few other issues

Doing votes is possible with this, but at the speed in which the console scrolls sometimes, it's not too feasible.





« Last Edit: December 23, 2007, 01:03:40 PM by sk89q »

Eiii

  • Autococker
  • Posts: 4595
Re: Custom console commands
« Reply #1 on: December 23, 2007, 12:58:50 AM »
I luv you. So much.

<3

So anyway, if you could just echo that there's a vote going on every 15 seconds, it could work. Does this show up in the chat box? I assume not. That's kinda an issue.

sk89q

  • Global Moderator
  • Autococker
  • Posts: 1049
Re: Custom console commands
« Reply #2 on: December 23, 2007, 01:01:12 AM »
The messages only show up for the user it's intended for. It will, however, show up in the chat box, so the user doesn't have to be in the console to see the messages.

Eiii

  • Autococker
  • Posts: 4595
Re: Custom console commands
« Reply #3 on: December 23, 2007, 01:13:03 AM »
Okay, that could work then. The vote notification messages just need to be intended for all users. ;)

sk89q

  • Global Moderator
  • Autococker
  • Posts: 1049
Re: !vote, !rules, and other commands on my server -- custom console commands
« Reply #4 on: December 23, 2007, 01:04:23 PM »
When you join:



=========

I have basic votes going:






=========

I am currently investigating how reliable these messages are.

Cobo

  • Autococker
  • Posts: 1362
Re: !vote, !rules, and other commands on my server -- custom console commands
« Reply #5 on: December 23, 2007, 03:09:25 PM »
Nice, how did you make it work without modifing the game source tho? Or did you mean you modified the client but not the server code?

sk89q

  • Global Moderator
  • Autococker
  • Posts: 1049
Re: !vote, !rules, and other commands on my server -- custom console commands
« Reply #6 on: December 23, 2007, 03:26:35 PM »
Connectionless print UDP packet. But, not all the messages get through the server, since the packet isn't coming from the server's port (and clearly I can't bind to it), I don't know how well firewalls/routers are "poking a hole" in themselves for the packet, but then again, it might be because of the client that's dropping the messages.

XtremeBain

  • Developer
  • Autococker
  • Posts: 1470
Re: !vote, !rules, and other commands on my server -- custom console commands
« Reply #7 on: December 23, 2007, 05:19:42 PM »
Use one of the existing functions to print that text to the client.

sk89q

  • Global Moderator
  • Autococker
  • Posts: 1049
Re: !vote, !rules, and other commands on my server -- custom console commands
« Reply #8 on: December 23, 2007, 05:33:11 PM »
I'm not aware of any function that prints text to the client from the server, without modifying the source. :3

XtremeBain

  • Developer
  • Autococker
  • Posts: 1470
Re: !vote, !rules, and other commands on my server -- custom console commands
« Reply #9 on: December 23, 2007, 05:40:30 PM »
Oh wait.... this is all being done externally.  You're allowed to modified the server's source as you please, it doesn't have any kind of checksuming on it that prevents it from being listed in public.  All the PBCup servers I ran hade modified source (for things like auto-record, and specinvites) without any problems.

Justinph5

  • Autococker
  • Posts: 1159
Re: !vote, !rules, and other commands on my server -- custom console commands
« Reply #10 on: December 23, 2007, 06:05:22 PM »
thats pretty cool, it'd be cool if you could make a !specinvite for spec'ing members of your team...      (altho I don't know what it would do) I just thought of it cuz Bain mentioned it   ;D

sk89q

  • Global Moderator
  • Autococker
  • Posts: 1049
Re: !vote, !rules, and other commands on my server -- custom console commands
« Reply #11 on: December 23, 2007, 06:25:31 PM »
As much as I can modify the source, I can't get it compiled and running on my server. It appears compiling for amd64 has been a headache for me, and compiling it on i386 and using compatibility libraries for amd64 requires I sync lib versions with my development system, and that's a pain.

Hades

  • PGP
  • Posts: 25
Re: !vote, !rules, and other commands on my server -- custom console commands
« Reply #12 on: December 23, 2007, 07:50:26 PM »
Did you enable tripping on your server?  Bain and I were playing on Shreds and even though I lag out every 15 seconds everyone else was having the problems .  There was constant hiccups all over the place on that map.  Dunno about others cause have shown it the cold shoulder since that experience.

sk89q

  • Global Moderator
  • Autococker
  • Posts: 1049
Re: !vote, !rules, and other commands on my server -- custom console commands
« Reply #13 on: December 23, 2007, 08:11:13 PM »
I wasn't sure if that was just with me or something. Earlier, I was experiencing too -- jumps were hitting some "ceiling" that did not exist. The odd thing was, at least on ub_rooftop, going towards a ramp from one side had no problem, but going towards it from the other side gave the issue consistently. Tripping is off; I checked it earlier.

==

EDIT: It appears to happen with b20 for me. B19 doesn't have this problem on my server.

KnacK

  • Global Moderator
  • Autococker
  • Posts: 3039
Re: !vote, !rules, and other commands on my server -- custom console commands
« Reply #14 on: December 23, 2007, 08:24:39 PM »
its an issue wit hthe new nix 20 code.  SOmething about math fucntions being fubard.

Jits is aware of the issue.

sk89q

  • Global Moderator
  • Autococker
  • Posts: 1049
Re: !vote, !rules, and other commands on my server -- custom console commands
« Reply #15 on: December 23, 2007, 08:26:11 PM »
Yeah, I read =( Oh well.

I downgraded the public server to b19.

Cobo

  • Autococker
  • Posts: 1362
Re: !vote, !rules, and other commands on my server -- custom console commands
« Reply #16 on: December 23, 2007, 09:48:48 PM »
I once wanted to do something like this with dp2 through the source, I wasnt able to do it back then.
I'm pretty sure I could do it now tho, since I was able to make a server filter out a list of custom words defined in a file from the chat messages, which is similar to what I wanted to do. And since I didnt had acces to the server code, all of this had to be done through the client code... Even though it would be so much easier to do through the server code...

lekky

  • Autococker
  • Posts: 2449
Re: !vote, !rules, and other commands on my server -- custom console commands
« Reply #17 on: December 26, 2007, 06:42:03 PM »
very nice sk89q :)

sk89q

  • Global Moderator
  • Autococker
  • Posts: 1049
Re: !vote, !rules, and other commands on my server -- custom console commands
« Reply #18 on: December 26, 2007, 10:54:59 PM »
Well, the project is a bust. I cannot get the messages to send reliably, and I do not know why. Packet sniffing on my computer does not show that my computer gets these messages, and this problem appears for other people. I was working on some C code to do the personal messages via the server code itself, but it will not compile and run correctly on my server, so I can't do that either.

However, since it seems to work most well right when you first join, my server still says HAPPY NEW YEAR or something when you connect :D, and I changed the after-game K/D, top streak, etc. info to use regular console messages.
« Last Edit: December 27, 2007, 12:15:13 AM by sk89q »

jitspoe

  • Administrator
  • Autococker
  • Posts: 18802
Re: !vote, !rules, and other commands on my server -- custom console commands
« Reply #19 on: December 27, 2007, 12:54:14 AM »
Not sure if this helps: The packets include a "qport" - a random number assigned so that the q2 engine knows what packet goes with what client when the network starts screwing with the addresses and ports.  If you read that out of each packet, you should be able to keep track of what ip/port goes to a specific client.