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

SLAG


Post New Thread Reply   
 
Thread Tools Display Modes
YamiKaitou
Has a lovely bunch of coconuts
Join Date: Apr 2006
Location: Texas
Old 12-01-2014 , 08:26   Re: SLAG
Reply With Quote #11

No temporary banning?

Better to use a const over a define for these
Code:
#define KEY_AUTHID "AuthID"
#define KEY_REASON "Reason"

Code:
const KEY_AUTHID[] = "AuthID";
const KEY_REASON[] = "Reason";
Does this support multiple servers using the same database? The code suggests no, but asking just in case.

Use formatex as opposed to format (where you can), it is faster.
__________________
ProjectYami Laboratories

I do not browse the forums regularly anymore. If you need me for anything (asking questions or anything else), then PM me (be descriptive in your PM, message containing only a link to a thread will be ignored).
YamiKaitou is offline
Old 12-01-2014, 14:51
Expade
This message has been deleted by Expade.
Expade
Junior Member
Join Date: Mar 2012
Location: Russian Federation
Old 12-01-2014 , 14:58   Re: SLAG
Reply With Quote #12

You're right, no temporary banning.

#define ≈ new const;
format ≈ formatex;
Are you count bits of RAM?

And, this plugin is support multiple servers. Why do you think that not?
__________________

Last edited by Expade; 12-01-2014 at 15:07.
Expade is offline
YamiKaitou
Has a lovely bunch of coconuts
Join Date: Apr 2006
Location: Texas
Old 12-01-2014 , 15:08   Re: SLAG
Reply With Quote #13

Quote:
Originally Posted by Expade View Post
This plugin is support multiple servers (Why not? O_o)
So if I ban a player on Server1 and then he tries to connect to Server2 right away, he will be kicked?
__________________
ProjectYami Laboratories

I do not browse the forums regularly anymore. If you need me for anything (asking questions or anything else), then PM me (be descriptive in your PM, message containing only a link to a thread will be ignored).
YamiKaitou is offline
Expade
Junior Member
Join Date: Mar 2012
Location: Russian Federation
Old 12-01-2014 , 15:32   Re: SLAG
Reply With Quote #14

He will be kicked after changelevel or restart on Server2
__________________
Expade is offline
klippy
AlliedModders Donor
Join Date: May 2013
Location: Serbia
Old 12-02-2014 , 05:38   Re: SLAG
Reply With Quote #15

Quote:
Originally Posted by Expade View Post
You're right, no temporary banning.

#define ≈ new const;
format ≈ formatex;
Are you count bits of RAM?

And, this plugin is support multiple servers. Why do you think that not?
If a string literal is found multiple times in code, it is better to use a constant to save some memory.
And formatex() is faster than format(), although format() must be used in some situations.
klippy is offline
HamletEagle
AMX Mod X Plugin Approver
Join Date: Sep 2013
Location: Romania
Old 12-02-2014 , 09:41   Re: SLAG
Reply With Quote #16

Quote:
Originally Posted by KliPPy View Post
If a string literal is found multiple times in code, it is better to use a constant to save some memory.
And formatex() is faster than format(), although format() must be used in some situations.
Can you please explain where formatex can't be used and where format is a must ?
__________________
HamletEagle is offline
YamiKaitou
Has a lovely bunch of coconuts
Join Date: Apr 2006
Location: Texas
Old 12-02-2014 , 09:46   Re: SLAG
Reply With Quote #17

Quote:
Originally Posted by HamletEagle View Post
Can you please explain where formatex can't be used and where format is a must ?
When you use the destination within the formatting, such as
format(msg, charsmax(msg), "[%s] %s", tag, msg);
__________________
ProjectYami Laboratories

I do not browse the forums regularly anymore. If you need me for anything (asking questions or anything else), then PM me (be descriptive in your PM, message containing only a link to a thread will be ignored).
YamiKaitou is offline
Backstabnoob
Veteran Member
Join Date: Feb 2009
Location: Iwotadai Dorm
Old 12-03-2014 , 05:09   Re: SLAG
Reply With Quote #18

Do not establish the database connection .15 seconds after plugin_init has been called. It's not safe and it doesn't guarantee that the cvars will be loaded - open the connection in plugin_cfg instead.

On the other hand, can you explain why exactly is this better than the other ban management plugins? "I don't like Advanced Bans" is not a valid reason and "my plugin is simpler" is not always a green instant-approval flag either.
__________________
Currently busy working on a very large scale anime database project.

Last edited by Backstabnoob; 12-03-2014 at 05:09.
Backstabnoob is offline
Expade
Junior Member
Join Date: Mar 2012
Location: Russian Federation
Old 12-03-2014 , 08:23   Re: SLAG
Reply With Quote #19

Hmm. I think that ≈0.1 seconds is guarantee that SLAG's CVARs will be loaded very well. "plugin_cfg" function have too much timeout (it has been tested)

My plugin is better 'cause:
1. Have not any MySQL query errors (like Advanced Bans)
2. Clean, simple code (against again Advanced Bans, look at "QueryCreateTable" function in adv.bans for example)
3. Support new and old amxx versions
4. In plans - add compatibility sqlite, etc.
__________________
Expade is offline
YamiKaitou
Has a lovely bunch of coconuts
Join Date: Apr 2006
Location: Texas
Old 12-03-2014 , 11:18   Re: SLAG
Reply With Quote #20

Quote:
Originally Posted by Expade View Post
Hmm. I think that ≈0.1 seconds is guarantee that SLAG's CVARs will be loaded very well. "plugin_cfg" function have too much timeout (it has been tested)
If I put the CVars in amxx.cfg, then they will not get set until plugin_cfg as that is when admin(_sql).amxx executes that file. What timeout are you talking about? If it is related to SQL, there will be no difference.

Quote:
1. Have not any MySQL query errors (like Advanced Bans)
Really? Cause right now, I can use SQL Injection with your plugin and cause errors or worse

Quote:
2. Clean, simple code (against again Advanced Bans, look at "QueryCreateTable" function in adv.bans for example)
That actually doesn't mean much

Quote:
3. Support new and old amxx versions
As do all the other ones
__________________
ProjectYami Laboratories

I do not browse the forums regularly anymore. If you need me for anything (asking questions or anything else), then PM me (be descriptive in your PM, message containing only a link to a thread will be ignored).

Last edited by YamiKaitou; 12-03-2014 at 11:19.
YamiKaitou 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 06:32.


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