Thread: Kick/ban not working

Results 1 to 19 of 19
  1. #1
    The Power of Aura Terrum's Avatar
    Join Date
    Jun 2006
    Location
    UK, Kent
    Posts
    54

    Kick/ban not working

    Hi everyone. I'm currently running a few Sven Co-op 5 servers on Windows. I'm using the Metamod-P attachment that's in the sticky of this category, and AMX Mod X Base v1.8.2 Windows from http://www.amxmodx.org/downloads.php

    I managed to get it all working and it seems to run quite stably with hardly any crashes even at max players - even though others seem to be getting more crashes.

    But I'm having a problem where kick/ban doesn't do anything when attempting to perform such (on any user, even if they are not admin). It shows the message in chat 'ADMIN <name> Kicked: <user>' (removed names and users for example purposes). But it doesn't actually kick or ban them.

    Any idea how to fix this?

    Many thanks
    Thanks,
    Terrum.


    http://www.epichosts.co.uk - Get a Sven Co-op 5 Server with 32 slots for only £5.99/$9 a month!

  2. #2
    incognico nico's Avatar
    Join Date
    Aug 2015
    Posts
    449

    Re: Kick/ban not working

    In scripting/*.sma replace all occurrences of #%d with ^"#%d^", for example: "server_cmd("kick #%d", userid2)" to "server_cmd("kick ^"#%d^"", userid2)"
    Then recompile the plugins and use those.

    This is a bug and will probably get fixed.
    Last edited by nico; 24-01-2016 at 05:51 PM.

  3. #3
    The Power of Aura Terrum's Avatar
    Join Date
    Jun 2006
    Location
    UK, Kent
    Posts
    54

    Re: Kick/ban not working

    Quote Originally Posted by nico View Post
    In scripting/*.sma replace all occurrences of #%d with ^"#%d^", for example: "server_cmd("kick #%d", userid2)" to "server_cmd("kick ^"#%d^"", userid2)"
    Then recompile the plugins and use those.

    This is a bug and will probably get fixed.
    Works flawlessly Thank you so much!
    Thanks,
    Terrum.


    http://www.epichosts.co.uk - Get a Sven Co-op 5 Server with 32 slots for only £5.99/$9 a month!

  4. #4
    Registered User TheEdvinazard's Avatar
    Join Date
    Jan 2016
    Location
    Lithuania
    Posts
    10

    Re: Kick/ban not working

    Terrum, can you provide new amxx or sma files? For some reason something doesn't work for me

  5. #5
    The Power of Aura Terrum's Avatar
    Join Date
    Jun 2006
    Location
    UK, Kent
    Posts
    54

    Re: Kick/ban not working

    Quote Originally Posted by TheEdvinazard View Post
    Terrum, can you provide new amxx or sma files? For some reason something doesn't work for me
    This is what I did:
    1) Downloaded clean .sma files from the AMX Mod X Base v1.8.2 at http://www.amxmodx.org/downloads.php
    2) Opened all the .sma files in the 'scripting' folder with Notepad++ in their own tab
    3) Pressed CTRL+H to open the 'Replace' feature and replaced all instances of #%d with ^"#%d^" in all open documents
    4) Saved all the documents. Then I ran compile.exe in Administrator mode, it showed a compiling terminal box.
    5) Once it was done I went into the 'compiled' folder (inside the 'scripting' folder) and copied over all the .amxx files into my 'plugins' folder.
    6) Restarted server, then done.

    Hope this helps you out
    Thanks,
    Terrum.


    http://www.epichosts.co.uk - Get a Sven Co-op 5 Server with 32 slots for only £5.99/$9 a month!

  6. #6
    Registered User TheEdvinazard's Avatar
    Join Date
    Jan 2016
    Location
    Lithuania
    Posts
    10

    Re: Kick/ban not working

    Thanks! It finally worked. The problem was that I used replace tool in Wordpad

  7. #7
    The Power of Aura Terrum's Avatar
    Join Date
    Jun 2006
    Location
    UK, Kent
    Posts
    54

    Re: Kick/ban not working

    Quote Originally Posted by TheEdvinazard View Post
    Thanks! It finally worked. The problem was that I used replace tool in Wordpad
    Glad it helped Wordpad uses its own formatting that isn't in plain text like Notepad or Notepad++

    So if you're doing coding I would strongly suggest avoiding Wordpad
    Thanks,
    Terrum.


    http://www.epichosts.co.uk - Get a Sven Co-op 5 Server with 32 slots for only £5.99/$9 a month!

  8. #8
    Not in the circlejerk S. H. Lynx's Avatar
    Join Date
    Sep 2009
    Location
    Santiago, Chile
    Posts
    186

    Re: Kick/ban not working

    Quote Originally Posted by nico View Post
    In scripting/*.sma replace all occurrences of #%d with ^"#%d^", for example: "server_cmd("kick #%d", userid2)" to "server_cmd("kick ^"#%d^"", userid2)"
    Then recompile the plugins and use those.

    This is a bug and will probably get fixed.
    This should be stickied.

    Servidor Hispano de Sven Co-op

    Current HN: Luces en Babel / Babylon (Steam) - I no longer use S. H. Lynx on my work.
    SteamID

  9. #9
    The Power of Aura Terrum's Avatar
    Join Date
    Jun 2006
    Location
    UK, Kent
    Posts
    54

    Re: Kick/ban not working

    Quote Originally Posted by S. H. Lynx View Post
    This should be stickied.
    Maybe I'm sure people know how to search too, though.

    Otherwise as nico said, I'm sure it'll probably get fixed soon
    Thanks,
    Terrum.


    http://www.epichosts.co.uk - Get a Sven Co-op 5 Server with 32 slots for only £5.99/$9 a month!

  10. #10
    Registered User TheEdvinazard's Avatar
    Join Date
    Jan 2016
    Location
    Lithuania
    Posts
    10

    Re: Kick/ban not working

    I also noticed that this fix fixed slot reseration problem as well in my server.

  11. #11
    Banned Solokiller's Avatar
    Join Date
    Sep 2004
    Location
    Belgium
    Posts
    3,314

    Re: Kick/ban not working

    Angelscript has an interface to set the number of reserved slots. It isn't being used by our code, but if there is a plugin that is using it, it could affect the setting.

  12. #12
    incognico nico's Avatar
    Join Date
    Aug 2015
    Posts
    449

    Re: Kick/ban not working

    Quote Originally Posted by Solokiller View Post
    Angelscript has an interface to set the number of reserved slots. It isn't being used by our code, but if there is a plugin that is using it, it could affect the setting.
    This means an Angelscript slot reservation plugin would be easily doable? One less amxx plugin

    BTW: The amxx slot reservation is unable to kick players because of that quotes bug and thus people can connect anyways and fill the reserved slots up completely (if the workaround is not applied). @TheEdvinazard it is more a workaround than a fix as this is a bug in SC so it depends on the bugfix allowing the quotes too, otherwise you have to undo this later.

  13. #13
    The Power of Aura Terrum's Avatar
    Join Date
    Jun 2006
    Location
    UK, Kent
    Posts
    54

    Re: Kick/ban not working

    Quote Originally Posted by TheEdvinazard View Post
    I also noticed that this fix fixed slot reseration problem as well in my server.
    I'm sure this will fix a fair amount of plugins that depend on name detection
    Thanks,
    Terrum.


    http://www.epichosts.co.uk - Get a Sven Co-op 5 Server with 32 slots for only £5.99/$9 a month!

  14. #14
    Registered User
    Join Date
    Dec 2008
    Posts
    7

    Re: Kick/ban not working

    For linux server owner: use this command in addons/amxmodx/scripting/ directory to replace strings in all files:
    Code:
    grep -rl '#%d' . | xargs sed -i 's/#%d/^"#%d^"/g'
    Reference: Replace a String in Multiple Files in Linux Using Grep and Sed

  15. #15
    Banned Solokiller's Avatar
    Join Date
    Sep 2004
    Location
    Belgium
    Posts
    3,314

    Re: Kick/ban not working

    Bug #3330 on the BTS. We should really get that fixed.

  16. #16
    incognico nico's Avatar
    Join Date
    Aug 2015
    Posts
    449

    Re: Kick/ban not working

    Quote Originally Posted by Shiaobin View Post
    For linux server owner: use this command in addons/amxmodx/scripting/ directory to replace strings in all files:
    Code:
    grep -rl '#%d' . | xargs sed -i 's/#%d/^"#%d^"/g'
    Reference: Replace a String in Multiple Files in Linux Using Grep and Sed
    Don't. This will probably break other stuff.

  17. #17
    Registered User
    Join Date
    Dec 2008
    Posts
    7

    Re: Kick/ban not working

    Quote Originally Posted by nico View Post
    Don't. This will probably break other stuff.
    Why this will break other stuff? It does actually what you said that replace all occurrences of #%d with ^"#%d^", doesn't it?

  18. #18
    incognico nico's Avatar
    Join Date
    Aug 2015
    Posts
    449

    Re: Kick/ban not working

    Quote Originally Posted by Shiaobin View Post
    Why this will break other stuff? It does actually what you said that replace all occurrences of #%d with ^"#%d^", doesn't it?
    Well only in lines with server_cmd("kick ... of course.

  19. #19
    de SPiKEe *x*D
    Join Date
    Dec 2008
    Location
    GERMANY
    Posts
    32

    Re: Kick/ban not working

    Quote Originally Posted by nico View Post
    In scripting/*.sma replace all occurrences of #%d with ^"#%d^", for example: "server_cmd("kick #%d", userid2)" to "server_cmd("kick ^"#%d^"", userid2)"
    Then recompile the plugins and use those.

    This is a bug and will probably get fixed.
    ok - I did - but I'm using admin_sql.amxx - wich there is no source-file for
    so admin.amxx - wich I edited and re-compiled - doesn't get loaded but admin_sql.amxx - wich doesn't contain any changes/fixes
    any help ?

    - edit -
    tested - and seems to work - I will report if I encounter problems with SQL-mode enabled

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •