TMN:Aseco Plugin Votelimit

This is the place where you can find everything related to the dedicated server, control scripts and community tools.

Moderators: Pit Crew, TM-Patrol

Post Reply
User avatar
mcm
road tourist
road tourist
Posts: 75
Joined: 30 Jan 2007 21:19
Owned TM-games: UNO
Location: in da house ;)
Contact:

TMN:Aseco Plugin Votelimit

Post by mcm » 01 Sep 2007 09:31

This plugin disables TMN Internal voting and replaces the system with chatcommands:
/res /next /kick /ban
for admins there is /votelimit for finetuning of the options

The votelimit affects also the amount of possible votes, the default is 1 restart and 1 next vote for the current track, it also restricts the time when a restart vote can be made and the default is 30 seconds before a track ends.
All defaults can be set in the plugin itself, i hope i documented it enough, but most values are settible ingame with /votelimit

its maybe not perfect yet, but it does a good job on my server (the best of all, i got rid of those annoying ladderrestarts :))

grabit here -> http://www.mcmweb.de/plugin/votelimit.zip

cow
smooth traffic navigator
smooth traffic navigator
Posts: 216
Joined: 20 Mar 2007 02:53
Owned TM-games: TMU, TMS, TMO
Contact:

Re: TMN:Aseco Plugin Votelimit

Post by cow » 01 Sep 2007 18:05

yeah i hate tmn voting..
ladder restarts not much so..
not to dis your script at all but to offer choice..
slly has beeen updating a script like this for quite a while
and it works well on my server.. my favorite part is the music will play on restarts unlike tmn voting..
there is no limit like your .. and no ban vote
tmforum3/viewtopic.php?t=9109
join me at the music tower
Tet19's MusicTower

User avatar
mcm
road tourist
road tourist
Posts: 75
Joined: 30 Jan 2007 21:19
Owned TM-games: UNO
Location: in da house ;)
Contact:

Re: TMN:Aseco Plugin Votelimit

Post by mcm » 01 Sep 2007 18:30

cow wrote:yeah i hate tmn voting..
ladder restarts not much so..
not to dis your script at all but to offer choice..
slly has beeen updating a script like this for quite a while
and it works well on my server.. my favorite part is the music will play on restarts unlike tmn voting..
there is no limit like your .. and no ban vote
tmforum3/viewtopic.php?t=9109
thx yes i know, but that vote displays a server message to the players so they must klick and its using lot of screen, with my plugin the people still have to press f1 or f2 and the vote is displayed like a real vote :), also very important is the kick n ban abilty for the players against rude people, those votes don't need limitations and must be available.

the coolest way would be to combine the positives of both plugins, but at the moment i realy dont know how to realize it, i'll stay on it and maybe ill find a way :)
(by the way, my musikvolume is on 0 ;))

Xymph
Pit Crew
Pit Crew
Posts: 5650
Joined: 19 Aug 2007 12:58
Owned TM-games: TMN, TMU, TMF, TM²
Contact:

Re: TMN:Aseco Plugin Votelimit

Post by Xymph » 02 Sep 2007 14:29

Interesting plugin. Can you explain why you're using the low-level IXR functions to initiate these votes? E.g. what does this bit of code do exactly?

Code: Select all

                $aseco->client->query('SetCallVoteRatio', $callvoteratio);
                //execute the kick vote
                $newclient = new IXR_Client_Gbx();
                $newclient->Init($serverport);
                $newclient->query('Authenticate', $serveradmin, $serveradminpw);
                $string = array($kickplayer);

                $request = new IXR_Request('Kick',$string);
                $xmla = $request->getXml();
                $newclient->query('CallVote', $xmla);
                $voteinprogress = 1;
Thanks,
Xymph
Developer of XASECO for TMF/TMN ESWC & XASECO2 for TM²: see XAseco.org
Find your way around the Mania community from the TMN ESWC hub, TMF hub, TM² hub, and SM hub

User avatar
mcm
road tourist
road tourist
Posts: 75
Joined: 30 Jan 2007 21:19
Owned TM-games: UNO
Location: in da house ;)
Contact:

Re: TMN:Aseco Plugin Votelimit

Post by mcm » 02 Sep 2007 16:24

Xymph wrote:Interesting plugin. Can you explain why you're using the low-level IXR functions to initiate these votes? E.g. what does this bit of code do exactly?

Code: Select all

                $aseco->client->query('SetCallVoteRatio', $callvoteratio);
                //execute the kick vote
                $newclient = new IXR_Client_Gbx();
                $newclient->Init($serverport);
                $newclient->query('Authenticate', $serveradmin, $serveradminpw);
                $string = array($kickplayer);

                $request = new IXR_Request('Kick',$string);
                $xmla = $request->getXml();
                $newclient->query('CallVote', $xmla);
                $voteinprogress = 1;
Thanks,
Xymph
first it enables the server callvote system by setting the callvoteratio below 1.0 (in this case $calvoteratio is 0.6) then it authenticates to the server with admin user and pass, then it initiates a xmlrpc call to kick a player, at the end setting the switch that a vote is runing so he can disable the callvote system ($calvoteratio 1.0) after the vote is over. didn't find the other way to do a real CallVote :).

Xymph
Pit Crew
Pit Crew
Posts: 5650
Joined: 19 Aug 2007 12:58
Owned TM-games: TMN, TMU, TMF, TM²
Contact:

Re: TMN:Aseco Plugin Votelimit

Post by Xymph » 02 Sep 2007 21:09

Okay, I can follow the overall steps, but that still doesn't explain why you're using low-level IXR calls instead of the standard $aseco->client->query call. Can you elaborate? What does setting up a $newclient achieve that normal calls don't?
Developer of XASECO for TMF/TMN ESWC & XASECO2 for TM²: see XAseco.org
Find your way around the Mania community from the TMN ESWC hub, TMF hub, TM² hub, and SM hub

User avatar
mcm
road tourist
road tourist
Posts: 75
Joined: 30 Jan 2007 21:19
Owned TM-games: UNO
Location: in da house ;)
Contact:

Re: TMN:Aseco Plugin Votelimit

Post by mcm » 03 Sep 2007 09:30

Xymph wrote:Okay, I can follow the overall steps, but that still doesn't explain why you're using low-level IXR calls instead of the standard $aseco->client->query call. Can you elaborate? What does setting up a $newclient achieve that normal calls don't?
nothing at all, but my problem is that i cannot program and even dont know the diference from the query and the call,
(u could also say : " hey u don't need this, take that inststead " and i would say : " thanks i was looking for that but didn't see ") :D

Xymph
Pit Crew
Pit Crew
Posts: 5650
Joined: 19 Aug 2007 12:58
Owned TM-games: TMN, TMU, TMF, TM²
Contact:

Re: TMN:Aseco Plugin Votelimit

Post by Xymph » 03 Sep 2007 21:26

mcm wrote:
Xymph wrote:Okay, I can follow the overall steps, but that still doesn't explain why you're using low-level IXR calls instead of the standard $aseco->client->query call. Can you elaborate? What does setting up a $newclient achieve that normal calls don't?
nothing at all, but my problem is that i cannot program and even dont know the diference from the query and the call,
Ok :lol:

I should have taken a better look at the Methods list, which indicates CallVote requires an XML formatted string, and now I understand why you're using IXR_Request and company.
mcm wrote:(u could also say : " hey u don't need this, take that inststead " and i would say : " thanks i was looking for that but didn't see ") :D
Not at all, I didn't even know it was possible to initiate normal F1/F2 votes this way. Thanks again.
Xymph
Developer of XASECO for TMF/TMN ESWC & XASECO2 for TM²: see XAseco.org
Find your way around the Mania community from the TMN ESWC hub, TMF hub, TM² hub, and SM hub

User avatar
mcm
road tourist
road tourist
Posts: 75
Joined: 30 Jan 2007 21:19
Owned TM-games: UNO
Location: in da house ;)
Contact:

Re: TMN:Aseco Plugin Votelimit

Post by mcm » 04 Sep 2007 04:54

Xymph wrote:
mcm wrote:
Xymph wrote:Okay, I can follow the overall steps, but that still doesn't explain why you're using low-level IXR calls instead of the standard $aseco->client->query call. Can you elaborate? What does setting up a $newclient achieve that normal calls don't?
nothing at all, but my problem is that i cannot program and even dont know the diference from the query and the call,
Ok :lol:

I should have taken a better look at the Methods list, which indicates CallVote requires an XML formatted string, and now I understand why you're using IXR_Request and company.
mcm wrote:(u could also say : " hey u don't need this, take that inststead " and i would say : " thanks i was looking for that but didn't see ") :D
Not at all, I didn't even know it was possible to initiate normal F1/F2 votes this way. Thanks again.
Xymph
no way :) i have to thank u, download a fresh copy and look at the source :)

Xymph
Pit Crew
Pit Crew
Posts: 5650
Joined: 19 Aug 2007 12:58
Owned TM-games: TMN, TMU, TMF, TM²
Contact:

Re: TMN:Aseco Plugin Votelimit

Post by Xymph » 04 Sep 2007 17:18

mcm wrote:no way :) i have to thank u, download a fresh copy and look at the source :)
Aha, that simplifies things a bit indeed. Nice work.
Xymph
Developer of XASECO for TMF/TMN ESWC & XASECO2 for TM²: see XAseco.org
Find your way around the Mania community from the TMN ESWC hub, TMF hub, TM² hub, and SM hub

Tecfan
sunday driver
sunday driver
Posts: 60
Joined: 12 Jun 2009 14:22
Owned TM-games: TMNF

Re: TMN:Aseco Plugin Votelimit

Post by Tecfan » 27 Oct 2009 16:47

does this work in xaseco/tmf? are there functions like this in xaseco for TMF?

User avatar
lille79
Pit Crew
Pit Crew
Posts: 881
Joined: 09 Dec 2007 15:04
Owned TM-games: TMN, TMNF, TMUF
Location: Norway
Contact:

Re: TMN:Aseco Plugin Votelimit

Post by lille79 » 27 Oct 2009 17:43

It's implemented in the votes-plugin.
\includes\votes.config.php
/lille79
Old man of the Norwegian Trackmania team Super Sheep Racing
To visit my homepage/blog, and download the usbTMFserver, this is the place to go.

nocturne
solid chaser
solid chaser
Posts: 1390
Joined: 08 Jun 2007 18:48
Owned TM-games: all
Contact:

Re: TMN:Aseco Plugin Votelimit

Post by nocturne » 27 Oct 2009 18:52

lille79 wrote:It's implemented in the votes-plugin.
\includes\votes.config.php
Actually, this plugin is not at all similar to chat-based voting...

What this plugin does is disable the standard call votes, and then through chat commands first re-enables the callvoteratio, creates a new client connection to the server, uses it to to send a query to start one of the built-in callvotes (kick, restart, etc..), and once the vote is over, it re-disables the callvotes entirely.

What this let's you do is instigate a standard callvote by chat command, and allow you to code basically any limitation you can think of in order to use the votes. Personally, I had used this plugin to allow me to limit restart voting to ranked players only in the last minute of the round, limit nextmap voting to ranked players who had finished the track at least twice before and only in the first minute of the round, and disable kick/ban voting entirely (previous to TMF, wasn't as simple as a config option).

Format-wise, I believe this plugin is still relatively compatible with Xaseco, though the method as to which it creates the new client connection was made incompatible as of Xaseco v0.88.

Post Reply