Raised This Month: $51 Target: $400
 12% 

[REQ] hostname changer plugin


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
LocutusH
Senior Member
Join Date: Dec 2007
Location: Hungary
Old 12-29-2007 , 05:22   [REQ] hostname changer plugin
Reply With Quote #1

We had this on our old server with ES, but i dont want to use ES anymore

So i would need a plugin, that simply changes the "hostname" cvar in given intervals to given texts.

For example, we had:
[OURSERVER][INFO1] by default in the server cfg

and then in the config to change every 60 (or else) seconds:
[OURSERVER][INFO2]
[OURSERVER][INFO3]
[OURSERVER][INFO4]

...and so on.


Cant be a too much complex plugin, hm?

Thx
LocutusH is offline
PrefeX
Member
Join Date: Apr 2006
Location: Norway
Old 12-29-2007 , 14:06   Re: [REQ] hostname changer plugin
Reply With Quote #2

you can use the Server Crontab plugin for this... Just set up a schedule for changing hostname, and you're good to go ;)
__________________
Life would be a lot easier if I had the source code.
PrefeX is offline
LocutusH
Senior Member
Join Date: Dec 2007
Location: Hungary
Old 12-29-2007 , 15:25   Re: [REQ] hostname changer plugin
Reply With Quote #3

Good idea, i will test it

The only thing is, its a litle complicated to set up a varying hostname for every 60 seconds That would do many cronjob lines.
And after mapchange, the server.cfg is executed, so it will default back on every mapchange...

The best would be still a changer plugin, that begins to change them at mapstart, every 60 seconds.
LocutusH is offline
Greyscale
SourceMod Plugin Approver
Join Date: Dec 2007
Location: strYoMommasHouse[you];
Old 12-29-2007 , 16:07   Re: [REQ] hostname changer plugin
Reply With Quote #4

Sounds like a fun little plugin to make, I'll make it for you if no one else wants to
Greyscale is offline
LocutusH
Senior Member
Join Date: Dec 2007
Location: Hungary
Old 12-29-2007 , 16:32   Re: [REQ] hostname changer plugin
Reply With Quote #5

Quote:
Originally Posted by Greyscale View Post
Sounds like a fun little plugin to make, I'll make it for you if no one else wants to
Would be great

Based on this idea, ive thinking a little beyond this.
Maybe what we need is a cron plugin, but not based on server time. It should work based on maptime. So do this, in the first minute, do that and that in the second... and then start over with a new map.
This could trigger the hostname changes, timed teamswaps, etc etc...
LocutusH is offline
PrefeX
Member
Join Date: Apr 2006
Location: Norway
Old 12-29-2007 , 22:28   Re: [REQ] hostname changer plugin
Reply With Quote #6

Quote:
Originally Posted by LocutusH View Post
Good idea, i will test it

The only thing is, its a litle complicated to set up a varying hostname for every 60 seconds That would do many cronjob lines.
And after mapchange, the server.cfg is executed, so it will default back on every mapchange...

The best would be still a changer plugin, that begins to change them at mapstart, every 60 seconds.
although i didn't test it, i think this crontask will swap every minute between 10 different hostnames ;)

Code:
sc_addjob ? ? ? ? ? ?0 "hostname <name 0>"
sc_addjob ? ? ? ? ? ?1 "hostname <name 1>"
sc_addjob ? ? ? ? ? ?2 "hostname <name 2>"
sc_addjob ? ? ? ? ? ?3 "hostname <name 3>"
sc_addjob ? ? ? ? ? ?4 "hostname <name 4>"
sc_addjob ? ? ? ? ? ?5 "hostname <name 5>"
sc_addjob ? ? ? ? ? ?6 "hostname <name 6>"
sc_addjob ? ? ? ? ? ?7 "hostname <name 7>"
sc_addjob ? ? ? ? ? ?8 "hostname <name 8>"
sc_addjob ? ? ? ? ? ?9 "hostname <name 9>"
__________________
Life would be a lot easier if I had the source code.
PrefeX is offline
Greyscale
SourceMod Plugin Approver
Join Date: Dec 2007
Location: strYoMommasHouse[you];
Old 12-31-2007 , 14:09   Re: [REQ] hostname changer plugin
Reply With Quote #7

I won't bother making the plugin if the above works, so post back to let us know
Greyscale is offline
LocutusH
Senior Member
Join Date: Dec 2007
Location: Hungary
Old 12-31-2007 , 14:38   Re: [REQ] hostname changer plugin
Reply With Quote #8

Quote:
Originally Posted by Greyscale View Post
I won't bother making the plugin if the above works, so post back to let us know

No we cannot replace just a character of a 2 digit number by a ?.

I would still like to see a separate plugin for this
LocutusH is offline
pRED*
Join Date: Dec 2006
Old 01-03-2008 , 20:11   Re: [REQ] hostname changer plugin
Reply With Quote #9

Try this:

Put the config in sourcemod/configs

Cvar : sm_hostname_frequency (default 60.0)

Can't say i've actually tested it but it should work.

I can add variable replacements if you want. (stuff like %currentmap% or %nextmap% etc -give me some ideas)
Attached Files
File Type: sp Get Plugin or Get Source (hostname.sp - 960 views - 2.5 KB)
File Type: txt hostnames.txt (326 Bytes, 318 views)
pRED* is offline
LocutusH
Senior Member
Join Date: Dec 2007
Location: Hungary
Old 01-04-2008 , 03:58   Re: [REQ] hostname changer plugin
Reply With Quote #10

Quote:
Originally Posted by pRED* View Post
Try this:

Put the config in sourcemod/configs

Cvar : sm_hostname_frequency (default 60.0)

Can't say i've actually tested it but it should work.

I can add variable replacements if you want. (stuff like %currentmap% or %nextmap% etc -give me some ideas)

Great And it works on our server already! Txh!!

Just one thing: It leaves an additional space between prefix and the variable area. Can you plz remove this?

Hm somehow it does not change to the second variable :/ Is 60 in seconds?
__________________

Last edited by LocutusH; 01-04-2008 at 04:01.
LocutusH is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 05:43.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode