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

Admin Bad Word Log


Post New Thread Reply   
 
Thread Tools Display Modes
Plugin Info:     Modification:   Counter-Strike        Category:   Server Management       
alferd
Veteran Member
Join Date: Dec 2019
Location: Iran is Always Eternal
Old 07-02-2020 , 06:56   Admin Bad Word Log
Reply With Quote #1

Admin Bad Word Log
version 1.01



Description:
You can use this plugin, Check out admins who say bad things,
All details are stored in the following file, And you can check the specifications in this files
Code:
addons/amxmodx/configs/Admin-Bad-Word_Log/xxxxxxxx.log


Requirements:
  • AMX Mod X 1.8.2 and up


Update:
  • 1.01 = Fixed Source Code
Attached Files
File Type: ini BadWords.ini (469 Bytes, 123 views)
File Type: sma Get Plugin or Get Source (admin_bad_word_log.sma - 213 views - 1.9 KB)

Last edited by alferd; 07-04-2020 at 03:39.
alferd is offline
HamletEagle
AMX Mod X Plugin Approver
Join Date: Sep 2013
Location: Romania
Old 07-02-2020 , 10:35   Re: Admin Bad Word Log
Reply With Quote #2

PHP Code:
register_plugin    (    PLUGIN,     VERSION,     AUTHOR        )
    
    
register_clcmd    (    "say"        ,        "BadWord"    
    
    
register_clcmd    (    "say_team"    ,        "BadWord"    )
    
    
mkdir        (            szLogFile            )
    
    
LoadList    (                             )

while        (     
<         g_BadNum     )
    
    {
        
        if (     (
szPos =     containi    szSaidg_BadWord[i][1]) ) != -)
        
            { 

                
szFound true 
            
}
            
        ++
i
        
    

What's up with all these spaces? It looks horrible.
__________________
HamletEagle is offline
alferd
Veteran Member
Join Date: Dec 2019
Location: Iran is Always Eternal
Old 07-02-2020 , 12:07   Re: Admin Bad Word Log
Reply With Quote #3

Quote:
Originally Posted by HamletEagle View Post
PHP Code:
register_plugin    (    PLUGIN,     VERSION,     AUTHOR        )
    
    
register_clcmd    (    "say"        ,        "BadWord"    
    
    
register_clcmd    (    "say_team"    ,        "BadWord"    )
    
    
mkdir        (            szLogFile            )
    
    
LoadList    (                             )

while        (     
<         g_BadNum     )
    
    {
        
        if (     (
szPos =     containi    szSaidg_BadWord[i][1]) ) != -)
        
            { 

                
szFound true 
            
}
            
        ++
i
        
    

What's up with all these spaces? It looks horrible.

There is no specific reason
__________________
Jailbreak AD 2.0

The greatest civilization of 🇮🇷IRAN🇮🇷
alferd is offline
OciXCrom
Veteran Member
Join Date: Oct 2013
Location: Macedonia
Old 07-02-2020 , 12:58   Re: Admin Bad Word Log
Reply With Quote #4

Then don't do it. Only thing it does is making things harder to read.
__________________
OciXCrom is offline
Send a message via Skype™ to OciXCrom
alferd
Veteran Member
Join Date: Dec 2019
Location: Iran is Always Eternal
Old 07-02-2020 , 13:04   Re: Admin Bad Word Log
Reply With Quote #5

Quote:
Originally Posted by OciXCrom View Post
Then don't do it. Only thing it does is making things harder to read.
ok
This will not be repeated in the next post
__________________
Jailbreak AD 2.0

The greatest civilization of 🇮🇷IRAN🇮🇷

Last edited by alferd; 07-02-2020 at 13:05.
alferd is offline
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 07-02-2020 , 23:21   Re: Admin Bad Word Log
Reply With Quote #6

Quote:
Originally Posted by alferd View Post
ok
This will not be repeated in the next post
It also won't happen in this post, you should fix your code. If you don't it certainly won't get approved.

Also, having an include file that contains half of your plugin is completely unnecessary, it serves no purpose and the include is not reusable (re-usability is the purpose of an include file). Put it all in the .sma file.
__________________

Last edited by fysiks; 07-02-2020 at 23:34.
fysiks is offline
alferd
Veteran Member
Join Date: Dec 2019
Location: Iran is Always Eternal
Old 07-03-2020 , 02:53   Re: Admin Bad Word Log
Reply With Quote #7

Quote:
Originally Posted by fysiks View Post
It also won't happen in this post, you should fix your code. If you don't it certainly won't get approved.
I will definitely do that

Quote:
Originally Posted by fysiks View Post
Also, having an include file that contains half of your plugin is completely unnecessary, it serves no purpose and the include is not reusable (re-usability is the purpose of an include file). Put it all in the .sma file.
Thanks for your tips
__________________
Jailbreak AD 2.0

The greatest civilization of 🇮🇷IRAN🇮🇷
alferd is offline
alferd
Veteran Member
Join Date: Dec 2019
Location: Iran is Always Eternal
Old 07-03-2020 , 04:47   Re: Admin Bad Word Log
Reply With Quote #8

VERSION 1.01
  • Fixed Source Code
__________________
Jailbreak AD 2.0

The greatest civilization of 🇮🇷IRAN🇮🇷
alferd is offline
+ARUKARI-
AlliedModders Donor
Join Date: Jul 2004
Location: Japan
Old 07-03-2020 , 04:54   Re: Admin Bad Word Log
Reply With Quote #9

Quote:
Originally Posted by HamletEagle View Post
Please use fopen/fgets(the new file natives) instead of read_file.
__________________
GitHub
SteamWishlist

六四天安門事件
+ARUKARI- is offline
alferd
Veteran Member
Join Date: Dec 2019
Location: Iran is Always Eternal
Old 07-03-2020 , 06:11   Re: Admin Bad Word Log
Reply With Quote #10

PHP Code:
while(g_BadNum MAX_WORDS && read_file    (g_BadWordFile2g_BadNum ,g_BadWord[g_BadNum][1], 30szLen)) 
To --->
PHP Code:
while(g_BadNum MAX_WORDS && fopen(g_BadWordFile2g_BadNum ,g_BadWord[g_BadNum][1], szLen)) 
This is what it means??
__________________
Jailbreak AD 2.0

The greatest civilization of 🇮🇷IRAN🇮🇷

Last edited by alferd; 07-03-2020 at 06:12.
alferd is offline
Reply


Thread Tools
Display Modes

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 11:34.


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