Admin_muppet <target> <time> <reason>

eagleceaglec Join Date: 2002-11-25 Member: 9948Members, Constellation
<div class="IPBDescription">adminmod plugin</div> The plugin_ns that <b>Lightning Blue</b> started has been growing.

It now contains <b>admin_muppet</b> which allows you to give a reason when you ban and displays to the client the reason, duration of the ban and contact information.

Attached is a sample output after this client named 'iamamuppet' was banned with the command:-
<b>admin_muppet iama 2 You are a muppet</b>

The plugin now resides at <a href='http://www.modns.org/forums/index.php?showtopic=48&st=0&' target='_blank'>Modns.org</a>

Comments

  • eagleceaglec Join Date: 2002-11-25 Member: 9948Members, Constellation
    edited September 2003
    //EDIT // The plugin now pulls and uses sv_contact properly.
  • UnknownUnknown Join Date: 1970-01-01 Member:
    Very nice! I'll pop this one on my server <!--emo&:)--><img src='http://www.unknownworlds.com/forums/html/emoticons/smile.gif' border='0' style='vertical-align:middle' alt='smile.gif'><!--endemo-->
  • Lightning_BlueLightning_Blue Sunny Domination Join Date: 2002-12-11 Member: 10647Members, Constellation, Reinforced - Silver
    eaglec, how about coding me a working redirect plugin for AM that is reserved slot aware? <!--emo&:D--><img src='http://www.unknownworlds.com/forums/html/emoticons/biggrin.gif' border='0' style='vertical-align:middle' alt='biggrin.gif'><!--endemo-->

    You seem to have a knack with making things work, and I have no luck getting redirect scripts to work.
  • ShockehShockeh If a packet drops on the web and nobody&#39;s near to see it... Join Date: 2002-11-19 Member: 9336NS1 Playtester, Forum Moderators, Constellation
    How about, assume I am nub for a second....

    Why don't I have a myscripts directory on my Linux AM install?

    (Never compiled a plugin before...) <!--emo&???--><img src='http://www.unknownworlds.com/forums/html/emoticons/confused.gif' border='0' style='vertical-align:middle' alt='confused.gif'><!--endemo-->
  • Lightning_BlueLightning_Blue Sunny Domination Join Date: 2002-12-11 Member: 10647Members, Constellation, Reinforced - Silver
    Shockwave, download the windows version, and unzip it to a folder of your choice. From there, you'll find the myscripts folder, and will be able to comple it.

    Then download the PluginConverter, available from the AM site.
  • ShockehShockeh If a packet drops on the web and nobody&#39;s near to see it... Join Date: 2002-11-19 Member: 9336NS1 Playtester, Forum Moderators, Constellation
    edited September 2003
    Nothing is ever frikkin' easy eh LB? <!--emo&;)--><img src='http://www.unknownworlds.com/forums/html/emoticons/wink.gif' border='0' style='vertical-align:middle' alt='wink.gif'><!--endemo-->

    Anyone got a Win32 version already I could convert? Save me some messing about. I can host a Linux version afterwards then
  • eagleceaglec Join Date: 2002-11-25 Member: 9948Members, Constellation
    edited September 2003
    It's really not that hard... but here you are, just this once.

    btw - there was a small bug in admin_autoteam on version prior to today.

    To fix edit line 90 to make AutoTeam all in lower case. ie AutoTeam, or dl the one I have just added to modns. Sorry.

    /edit/ oops, I didn't fix autoteam, just knackered it in a new and interesting way. Sorry about that - now fixed and tested. ie. it works this time.
  • ShockehShockeh If a packet drops on the web and nobody&#39;s near to see it... Join Date: 2002-11-19 Member: 9336NS1 Playtester, Forum Moderators, Constellation
    Ta Eaglec. I'm back to front from everyone else on this one. TCP/IP support? A-1 (Hell, it's my job!) but scripting......

    <!--c1--></span><table border='0' align='center' width='95%' cellpadding='3' cellspacing='1'><tr><td><b>CODE</b> </td></tr><tr><td id='CODE'><!--ec1-->I = Nub
    GOTO 1<!--c2--></td></tr></table><span class='postcolor'><!--ec2-->

    Is about it <!--emo&;)--><img src='http://www.unknownworlds.com/forums/html/emoticons/wink.gif' border='0' style='vertical-align:middle' alt='wink.gif'><!--endemo-->
  • Lightning_BlueLightning_Blue Sunny Domination Join Date: 2002-12-11 Member: 10647Members, Constellation, Reinforced - Silver
    Shockeh, catch me later on IRC and I'll give ya a walkthrough <!--emo&::nerdy::--><img src='http://www.unknownworlds.com/forums/html/emoticons/nerd.gif' border='0' style='vertical-align:middle' alt='nerd.gif'><!--endemo-->
  • eagleceaglec Join Date: 2002-11-25 Member: 9948Members, Constellation
    Funny you should say that Shockwave. I'm a network/computer engineer myself and also know naff all about scripting and programming but somehow if the job needs doing I'll figure out a way...
  • starveystarvey Join Date: 2002-11-03 Member: 5922Members
    Very nice.
    Looks like something that I'll have to play around with on my server tonight.
    <!--emo&::gorge::--><img src='http://www.unknownworlds.com/forums/html/emoticons/pudgy.gif' border='0' style='vertical-align:middle' alt='pudgy.gif'><!--endemo-->
  • eagleceaglec Join Date: 2002-11-25 Member: 9948Members, Constellation
    ok, this is the windows latest compile of ns_plugin. I think I'll be leaving it alone now as it all seems to work properly. If I do future command related stuff should it go in new plugin or should I add it to this?

    Anyway here it is - if someone has done the linux version of the latest version - new 10 minutes ago please be helpful and post a link to it here also <!--emo&:)--><img src='http://www.unknownworlds.com/forums/html/emoticons/smile.gif' border='0' style='vertical-align:middle' alt='smile.gif'><!--endemo-->
  • TalesinTalesin Our own little well of hate Join Date: 2002-11-08 Member: 7710NS1 Playtester, Forum Moderators
    eaglec, wouldn't it be more efficient to just initialize strTime to "0" during declaration, and remove the if statement from:
    <!--c1--></span><table border='0' align='center' width='95%' cellpadding='3' cellspacing='1'><tr><td><b>CODE</b> </td></tr><tr><td id='CODE'><!--ec1-->if(strlen(strTime) != 0) BanTime = strtonum(strTime);<!--c2--></td></tr></table><span class='postcolor'><!--ec2-->
    To both remove a compare, and at the same time be certain of showing a number of minutes on the ban notification screen? At the moment if no number of minutes is specified, it just says 'Ban duration will be minutes. (0 = permanent)', which could confuse some people.
  • eagleceaglec Join Date: 2002-11-25 Member: 9948Members, Constellation
    edited October 2003
    Hmm. I think I can do that... I'll try.

    //nope didn't seem to work and didnt seem to be any point.. The idea of admin_muppet is for the server op to add 3 variables, Name, Time AND Reason. Leave any of that information out and they might as well use admin_ban. If the time is left blank then the reason cannot be given...
  • TalesinTalesin Our own little well of hate Join Date: 2002-11-08 Member: 7710NS1 Playtester, Forum Moderators
    I've never coded Metamod plugins before, but it appears to be at least somewhat C-oriented, if not outright. Let me staple together some pseudocode and mail it off to you in the morning (er, or after class I should say.. college tomorrow) that'd attempt to auto-determine if a time for ban was given, and handle it automatically.

    If I've got some extra time in class, probably wouldn't be too hard to include things like abbreviated interval predefines (meaning, could just type 'admin_muppet Idiot 3d4h72m You need to cool off', and have him banned for 4632 minutes). As noted, this is dependent upon it actually being C or C++.
  • eagleceaglec Join Date: 2002-11-25 Member: 9948Members, Constellation
    edited October 2003
    That sounds pretty cool, 2 things you may want to keep in mind though.
    1. This is an adminmod script, not a metamod pluggin
    2. It's C like but its actually modified 'Small'. <a href='http://www.ravenousbugblatterbeast.pwp.blueyonder.co.uk/Script/' target='_blank'>usefull link</a>

    <!--emo&:)--><img src='http://www.unknownworlds.com/forums/html/emoticons/smile.gif' border='0' style='vertical-align:middle' alt='smile.gif'><!--endemo-->

    //edit // as I have stated before I have no experience or skill in any form of coding programming or scripting. My speciality is in 'making stuff work'.
  • Lightning_BlueLightning_Blue Sunny Domination Join Date: 2002-12-11 Member: 10647Members, Constellation, Reinforced - Silver
    edited October 2003
    <!--QuoteBegin--eaglec+Oct 22 2003, 03:47 AM--></span><table border='0' align='center' width='95%' cellpadding='3' cellspacing='1'><tr><td><b>QUOTE</b> (eaglec @ Oct 22 2003, 03:47 AM)</td></tr><tr><td id='QUOTE'><!--QuoteEBegin--> Hmm. I think I can do that... I'll try.

    //nope didn't seem to work and didnt seem to be any point.. The idea of admin_muppet is for the server op to add 3 variables, Name, Time AND Reason. Leave any of that information out and they might as well use admin_ban. If the time is left blank then the reason cannot be given... <!--QuoteEnd--></td></tr></table><span class='postcolor'><!--QuoteEEnd-->
    Actually, I took your <b>admin_muppet</b> code, changed it to <b>admin_ban</b>, and replaced the default <b>admin_ban</b> code in the <b>plugin_base</b> with your code, and recompiled. <!--emo&::nerdy::--><img src='http://www.unknownworlds.com/forums/html/emoticons/nerd.gif' border='0' style='vertical-align:middle' alt='nerd.gif'><!--endemo--> The only thing we lost was <b>admin_banip</b>, not that big of a deal.

    We really like the on screen thing with the reason and the contact info, but I didn't want my admins to have to remember two commands. <!--emo&:p--><img src='http://www.unknownworlds.com/forums/html/emoticons/tounge.gif' border='0' style='vertical-align:middle' alt='tounge.gif'><!--endemo-->

    Right now, if you use the command like <b>admin_ban lamer</b>, it functions just as the default <b>admin_ban</b> does, gives them a perm ban and writes it to the banned.cfg, but shows <!--c1--></span><table border='0' align='center' width='95%' cellpadding='3' cellspacing='1'><tr><td><b>CODE</b> </td></tr><tr><td id='CODE'><!--ec1-->You have been banned for  Minutes.<!--c2--></td></tr></table><span class='postcolor'><!--ec2--> (Note the space).

    <b>admin_ban lamer 0</b> shows <i>You have been banned for 0 Minutes.</i> like it should.

    I can't code well either, but yeah, making stuff work is fun, I like to tinker <!--emo&::lerk::--><img src='http://www.unknownworlds.com/forums/html/emoticons/lerk.gif' border='0' style='vertical-align:middle' alt='lerk.gif'><!--endemo-->
  • TalesinTalesin Our own little well of hate Join Date: 2002-11-08 Member: 7710NS1 Playtester, Forum Moderators
    LB, when I get home DCC me the original bit that included admin_banip and I'll see if I can work it in, if the adminmod form is similar enough to C/C++ (though I'll be using pointers... dunno if that's a part of the AM scripting thing). Will read through that link when I head home too.
Sign In or Register to comment.