This is the new home of the egghelp.org community forum.
All data has been migrated (including user logins/passwords) to a new phpBB version.


For more information, see this announcement post. Click the X in the top right-corner of this box to dismiss this message.

rcon script

Old posts that have not been replied to for several years.
Locked
R
Rav^4u
Voice
Posts: 19
Joined: Thu Jun 05, 2003 1:16 pm

rcon script

Post by Rav^4u »

OK using this comand (with the global settings of course)

set rcon [open "|$rcon_path/rcon $rcon_password1 $rcon_address1 $rcon_port1 \"changelevel $pwf_maptopic\"" r]

now this works perfectly but leave rcon open when i check process "ps -x"

they stay open untill eggdop is killed, how can i close them?

close $rcon
return 0

Would that work? or is there another/better way?

Thanks in advance for any help
User avatar
stdragon
Owner
Posts: 959
Joined: Sun Sep 23, 2001 8:00 pm
Contact:

Post by stdragon »

Don't be afraid to try it :)
R
Rav^4u
Voice
Posts: 19
Joined: Thu Jun 05, 2003 1:16 pm

Post by Rav^4u »

lol thanks mate :D

Right my master plan is working :D

CS Pickup Scipt

So far...

IRC is working fine, player join the channel add them selves to a game, when the required number of players is reached the bot changes the server to the correct map and sets the correct password, all players are notified the details :D so far so good.

Now once they are on the server all is controlled. When all players are on, a 5 minutes warmup starts. Then they settings are loaded and and players are frozen for 2 mins to allow for tactics talks. After 2 mins the game begins.. after 12 rounds the players are swap teams (auto by script) and are given a firther 2 mins for tactics discussions. Then the second round starts up.. at the end the score is displayed and game over :D

But (fingers hurting now). I need a way of the user logging in before they are added to a game so that their WONID can be relayed to the server and the teams/playernames are kept as they should be.

I wanted to do this without database/MYSQL (although that is available). ie.. they do

/msg bot addme CSplayername password wonid

ie...

/msg Bot addme Rav monkeys 123456

any help on this would be greatly appreciateed :D (a script allowing them to do this would be even better lol )
User avatar
Papillon
Owner
Posts: 724
Joined: Fri Feb 15, 2002 8:00 pm
Location: *.no

Post by Papillon »

well, you could just add the users to the bot and store the wonid in the users xtra field. then make a script that checks the given password against the one set in the bot (passwdok)
Or you can save the info in a file, and make a script that checks that instead..
or... use the mysql to do the storing/cheking (I would recommend this) :)
Elen sila lúmenn' omentielvo
R
Rav^4u
Voice
Posts: 19
Joined: Thu Jun 05, 2003 1:16 pm

Post by Rav^4u »

Thanks mate..

TCL scripts not my best area, the server side scripts not a problems at all but not sure on TCL.

how would i go about doing that.. if you could set me off pls
User avatar
stdragon
Owner
Posts: 959
Joined: Sun Sep 23, 2001 8:00 pm
Contact:

Post by stdragon »

tcl-commands.doc is your friend in these situations. Look in the "BINDS" section, you will need a MSG bind to create the addme command. It tells you the parameters you need to have in your proc (like proc yourcmd {nick uhost hand text} { ... } ). Then inside the proc, you can use the validuser command to see if they already exist, the adduser command to create them, and setuser to set their password and wonid thingy.

The whole line of text after 'addme' will be in the $text variable. If someone goes /msg bot addme stdragon sheepsheep 12345, then the args will be like

nick = me
uhost = blah@blahblah.com
hand = *
text = "stdragon sheepsheep 12345"

If you don't know tcl, you can check out http://www.tcl.tk/man/tcl8.3/TclCmd/contents.htm to see what all you can do with it. Basically you need "split" to turn $text into a list, and then "lindex" to retrieve each element.
Locked