Raised This Month: $32 Target: $400
 8% 

Advanced Bans (Real Time) by Exolent


Post New Thread Reply   
 
Thread Tools Display Modes
CyberMaN
Junior Member
Join Date: Mar 2009
Old 08-04-2009 , 08:18   Re: Advanced Bans (Real Time) by Exolent
Reply With Quote #441

Thanks for the idea, solved my problem. I've been at this for two days, you know sometimes your mind gets stuck at some point and you can't just figure out something real simple.

Ok, so I uncommented the admin sql amxx (which i thought i'd already done >.<) and it came up with this error:

[AMXX] SQL error: can't connect: 'Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)'

If any of you get this error with your mysql.sock, which may be in some other location than /tmp/mysql.sock (mine was in laamp directory) you can execute this command:

ln -s YourMysql.sockLocation /tmp/mysql.sock (or wherever it says it can't find it)

Everything works perfect now.
Thanks again alexinno.

Regards,

James.
CyberMaN is offline
alexinno
Senior Member
Join Date: Mar 2007
Location: C:\
Old 08-04-2009 , 11:17   Re: Advanced Bans (Real Time) by Exolent
Reply With Quote #442

you only get that kind of errors if you use some all in one packages like lamp from apachefriends , if that's what're using instead of installing what you need with your distro's package manager (apt-get , yum , yast...) which is very easy to do.

i'm glad that you worked this out though
__________________

[IMG]http://img188.**************/img188/5787/banner2rcw.png[/IMG]
alexinno is offline
HLM
Senior Member
Join Date: Apr 2008
Location: C:\WINDOWS\System32
Old 08-17-2009 , 18:26   Re: Advanced Bans (Real Time) by Exolent
Reply With Quote #443

alexinno, I am trying to use your mysql php script to list bans, it is missing an image (solved by copying an image) and a javascript loader.. do you still have this file? id also like to point out that banned name has a typo (baned instead of banned) also banlenth (banlenght instead of banlength) just throwing that out there..

about that javascript file.. you still have it?
__________________
+|- KARMA Respectively

HLM is offline
alexinno
Senior Member
Join Date: Mar 2007
Location: C:\
Old 08-18-2009 , 10:31   Re: Advanced Bans (Real Time) by Exolent
Reply With Quote #444

Quote:
Originally Posted by HLM View Post
alexinno, I am trying to use your mysql php script to list bans, it is missing an image (solved by copying an image) and a javascript loader.. do you still have this file? id also like to point out that banned name has a typo (baned instead of banned) also banlenth (banlenght instead of banlength) just throwing that out there..

about that javascript file.. you still have it?
thx for pointing this out , i've updated the attachment in this reply http://forums.alliedmods.net/showpos...&postcount=392
Added: search function
new page with ban details
and a little styling ( i'm not very good at this )

Let me know if you find some other "bugs"
__________________

[IMG]http://img188.**************/img188/5787/banner2rcw.png[/IMG]

Last edited by alexinno; 08-18-2009 at 14:45.
alexinno is offline
HLM
Senior Member
Join Date: Apr 2008
Location: C:\WINDOWS\System32
Old 08-18-2009 , 14:10   Re: Advanced Bans (Real Time) by Exolent
Reply With Quote #445

very good, with error reporting off (because its a value defined from another file, IDK something along those lines) its working fine, BUT for those of you who want to change link1 link2 etcetera and dont know how.. heres how to do it.. im assuming your using the default template (wait, theres others? ) go to your adveanced webs folder then from there go to ./theme/default/template/ open index.php

in index.php go to line 76, at line 76 the text 'Link1' (the text before that makes the block, its html code for specil character) with a hyperlink.. likeso

PHP Code:
<a href="http://mysite.com/bans/unban_appeal.php">Unban Appeal</a
as long as you keep it in that format you shall be safe, oh and you can add more links if you want too

oh, since were on that topic, the 'some text or baner' is line 63, you can also hyperlink it, but I would recommend just making it point to "./index.php" (a banner that points you to advanced bans web home)

since there is no home button from search.. not that its needed... ok, thats my editing guide for today..
__________________
+|- KARMA Respectively

HLM is offline
Owyn
Veteran Member
Join Date: Nov 2007
Old 08-19-2009 , 15:53   Re: Advanced Bans (Real Time) by Exolent
Reply With Quote #446

i doubt if Exolent still visits this but i'll give it a shot and ask here:

Code:
RemoveBan(pos, const authid[])
{
    TrieDeleteKey(g_trie, authid);
    ArrayDeleteItem(g_array, pos);
    
    g_total_bans--;
    
    new f = fopen(g_ban_file, "wt");
    
    new data[BannedData];
    for( new i = 0; i < g_total_bans; i++ )
    {
        ArrayGetArray(g_array, i, data);
        TrieSetCell(g_trie, data[bd_steamid], i);
        
        fprintf(f, "^"%s^" ^"%s^" %i ^"%s^" ^"%s^" ^"%s^" ^"%s^"^n",\
            data[bd_steamid],\
            data[bd_name],\
            data[bd_banlength],\
            data[bd_unbantime],\
            data[bd_reason],\
            data[bd_admin_name],\
            data[bd_admin_steamid]
            );
    }
    
    fclose(f);
}
(look bold text)

why do you reset the whole trie database when removing a single ban?
__________________
☜ Free Mozy ☂backup\҉sync user
Quote:
Американский форум - Задаёшь вопрос, потом тебе отвечают.
Израильский форум - Задаёшь вопрос, потом тебе задают вопрос.
Русский форум - Задаёшь вопрос, потом тебе долго рассказывают, какой ты мудак.
Owyn is offline
Send a message via ICQ to Owyn
Exolent[jNr]
Veteran Member
Join Date: Feb 2007
Location: Tennessee
Old 08-19-2009 , 15:55   Re: Advanced Bans (Real Time) by Exolent
Reply With Quote #447

Quote:
Originally Posted by .Owyn. View Post
i doubt if Exolent still visits this but i'll give it a shot and ask here:

Code:
RemoveBan(pos, const authid[])
{
    TrieDeleteKey(g_trie, authid);
    ArrayDeleteItem(g_array, pos);
    
    g_total_bans--;
    
    new f = fopen(g_ban_file, "wt");
    
    new data[BannedData];
    for( new i = 0; i < g_total_bans; i++ )
    {
        ArrayGetArray(g_array, i, data);
        TrieSetCell(g_trie, data[bd_steamid], i);
        
        fprintf(f, "^"%s^" ^"%s^" %i ^"%s^" ^"%s^" ^"%s^" ^"%s^"^n",\
            data[bd_steamid],\
            data[bd_name],\
            data[bd_banlength],\
            data[bd_unbantime],\
            data[bd_reason],\
            data[bd_admin_name],\
            data[bd_admin_steamid]
            );
    }
    
    fclose(f);
}
(look bold text)

why do you reset the whole trie database when removing a single ban?
Because of this:
Code:
    ArrayDeleteItem(g_array, pos);
The integer retrieved with TrieGetCell( ) holds the array position in the g_array.
When ArrayDeleteItem( ) is used, all the items after it are shifted down, thus moving their array position.
__________________
No private work or selling mods.
Quote:
Originally Posted by xPaw View Post
I love you exolent!
Exolent[jNr] is offline
Old 08-19-2009, 16:02
Owyn
This message has been deleted by Owyn. Reason: yes
Old 08-20-2009, 07:54
Owyn
This message has been deleted by Owyn. Reason: ups
STr!ker
Senior Member
Join Date: Jun 2009
Location: Germany
Old 08-20-2009 , 09:17   Re: Advanced Bans (Real Time) by Exolent
Reply With Quote #448

Can you in data folder add a Resonmenu?
so i can create a .txt data with reason in data folder, and when i want to ban or kick i can choose a reason like in amxbans?
STr!ker is offline
Skyttens
Junior Member
Join Date: Apr 2009
Old 08-20-2009 , 13:34   Re: Advanced Bans (Real Time) by Exolent
Reply With Quote #449

Hmm i got this plugin, tried it by banning myself, now i can't seem to unban myself lol. I deleted my Steam ID from Banned.CFG and server changed level, and i still can not unban myself. I have tried unbanning myself by writing "amx_unban *steam id*" in my dedicated server console but it does not work either.. Can anyone help me? P:
Skyttens is offline
Exolent[jNr]
Veteran Member
Join Date: Feb 2007
Location: Tennessee
Old 08-20-2009 , 14:11   Re: Advanced Bans (Real Time) by Exolent
Reply With Quote #450

1. The bans are not stored in banned.cfg
2. You must use quotes around the steamid: amx_unban "STEAM_0:1:23456"
__________________
No private work or selling mods.
Quote:
Originally Posted by xPaw View Post
I love you exolent!
Exolent[jNr] is offline
Reply



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 23:00.


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