Renegade Public Forums
C&C: Renegade --> Dying since 2003™, resurrected in 2024!
Home » Renegade Discussions » Mod Forum » brenbot plugin needed
Re: brenbot plugin needed [message #419013 is a reply to message #418863] Mon, 01 February 2010 13:57 Go to previous messageGo to previous message
danpaul88 is currently offline  danpaul88
Messages: 5795
Registered: June 2004
Location: England
Karma:
General (5 Stars)
Well I am pretty busy with stuff at the moment but after reading this I decided it should be pretty easy to do... simply override the built in auth-command with a plugin one, call the built-in command from the plugin command and then check that the auth was successful.


NOTE: This code is untested as I simply don't have the time right now, I just threw it together in 5 minutes to show how it can be done. It might or might not work as intended.



Oh, just an FYI, the issue with temp mods leaving the game and still being temped when rejoining was fixed several versions ago, in an internal beta prior to 1.50 if I remember correctly.




EDIT: And, before anyone asks, the plugin will only call the attach console command for successful authentications on Admins, Full Mods, Half Mods and Temp Mods, all other successful authentications will NOT trigger the console command.



For anyone interested in the relevant code without downloading the zip file;

Toggle Spoiler



In addition to the code for the overridden command you will also need to copy the command declaration from the commands.xml file into the plugins XML file (otherwise the bot won't know your new command exists), add the command event to the plugins events list in the XML and handle the command event in the plugin code in the usual way.

Because plugin commands are looked for first any command in a plugin matching the name of a built in command will override the built in command.






EDIT 2: See 2 posts down for download, fixed a bug. Note that the code in the spoiler above has been updated to the correct version as attached to the post below.


http://steamsignature.com/card/1/76561197975867233.png

[Updated on: Mon, 01 February 2010 14:20]

Report message to a moderator

 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: muzzleflash
Next Topic: Nod Arty sfx skew
Goto Forum:
  


Current Time: Fri Dec 27 20:01:45 MST 2024

Total time taken to generate the page: 0.00998 seconds