Release Bad Names Kick Plugin v3.0
#51
(04-25-2012, 18:20)OzonE Wrote: bonemind's plugin?
thats the kicking command and shit , exist in every plugin.

I know but can't you modify it to Kick/ban player on entry of server if the person has the name in forbidden.txt?
Reply

#52
i think the bug is in the strings shit , it checks every character of it , i think we have to modify to make it read the name only.
Reply

#53
Explaining problems according to source code on page 1:

- kick command is for name not for ClientNum
- Since you are splitting the name, people who use name like aFucka don't get kicked
- You are comparing with case sensitive
- Using if clause wrong
Code:
public override void OnPlayerConnect(ServerClient Client) { string[] cn = Client.Name.Split(' '); foreach (string x in cn) { if (fwords.Contains(x)) ServerSay("^7BadName Plugin ^1Prevented Connection of A ^5Badname Player!", true); //The kick command will always be executed, no matter what the if tells. ServerCommand("kick " + Client.ClientNum + "\" Bad Name, ^1Fuck Off!\""); } }
It should be
Code:
if (fwords.Contains(x)) { ServerSay("^7BadName Plugin ^1Prevented Connection of A ^5Badname Player!", true); ServerCommand("dropClient " + Client.ClientNum + "\" Bad Name, ^1Fuck Off!\""); }
[Image: azuw.jpg]
Reply

#54
(04-26-2012, 08:19)zxz0O0 Wrote: Explaining problems according to source code on page 1:

- kick command is for name not for ClientNum
- Since you are splitting the name, people who use name like aFucka don't get kicked
- You are comparing with case sensitive
- Using if clause wrong
Code:
public override void OnPlayerConnect(ServerClient Client) { string[] cn = Client.Name.Split(' '); foreach (string x in cn) { if (fwords.Contains(x)) ServerSay("^7BadName Plugin ^1Prevented Connection of A ^5Badname Player!", true); //The kick command will always be executed, no matter what the if tells. ServerCommand("kick " + Client.ClientNum + "\" Bad Name, ^1Fuck Off!\""); } }
It should be
Code:
if (fwords.Contains(x)) { ServerSay("^7BadName Plugin ^1Prevented Connection of A ^5Badname Player!", true); ServerCommand("dropClient " + Client.ClientNum + "\" Bad Name, ^1Fuck Off!\""); }

Oh now I see xP I'll build another version. zxz thanks a ton!
Reply

#55
Nope... People still get booted out of the match..
Might try one more thing.. if this works then Me Gusta
Can't test my plugin b/c my plugins don't load in my server Dumb Bitch tha fuck Dumb Bitch
Reply

#56
@bonemind thanks for info..
Quote:I think this is wrong, When you write the if statement without {}, only the line below it is consideren part of it, so this piece of code executes ServerSay if a forbidden word is found, and then bans the player anyway xD
aight much help but which part should I change?
Well...i could literally write it but i'm not going to
Since writing an if statement without {} makes the next line only part of it, and multiple lines should be part of it, how about adding {} at the quoted if statement? xD
and no, i'm not trolling by not saying it, just spitting it out wouldn't teach you anything
Now I still need to figure out what's wrong xP
Reply

#57
Aight 100% fixed tested this over 10 times with different names, people, and commands. Will upload soon.
Ok guys finally it's now ready! This time it won't kick/ban everyone Big Grin
Commands I changed to: !badname @GrossKopf thought !plus is silly as well as I did so xP


Attached Files
.rar   BadName V3.rar (Size: 5.68 KB / Downloads: 237)
Reply

#58
(04-28-2012, 21:47)DidUknowiPwn Wrote: @bonemind thanks for info..
Quote:I think this is wrong, When you write the if statement without {}, only the line below it is consideren part of it, so this piece of code executes ServerSay if a forbidden word is found, and then bans the player anyway xD
aight much help but which part should I change?
Well...i could literally write it but i'm not going to
Since writing an if statement without {} makes the next line only part of it, and multiple lines should be part of it, how about adding {} at the quoted if statement? xD
and no, i'm not trolling by not saying it, just spitting it out wouldn't teach you anything
Now I still need to figure out what's wrong xP
Lol that's what I already said in my previous post.

[Image: azuw.jpg]
Reply

#59
(04-29-2012, 09:29)zxz0O0 Wrote:
(04-28-2012, 21:47)DidUknowiPwn Wrote: @bonemind thanks for info..
Quote:I think this is wrong, When you write the if statement without {}, only the line below it is consideren part of it, so this piece of code executes ServerSay if a forbidden word is found, and then bans the player anyway xD
aight much help but which part should I change?
Well...i could literally write it but i'm not going to
Since writing an if statement without {} makes the next line only part of it, and multiple lines should be part of it, how about adding {} at the quoted if statement? xD
and no, i'm not trolling by not saying it, just spitting it out wouldn't teach you anything
Now I still need to figure out what's wrong xP
Lol that's what I already said in my previous post.

Ya and I just saw it as well. The reason yours didn't work is because you can't add a reason for the kick once removed and added {} it worked flawlessly... So much fail on both of our parts Big Grin
Reply

#60
Good Work , Nais.
Reply



Possibly Related Threads…
Thread Author Replies Views Last Post
Rainbow [Release] Plugin ReservedSlot v1.3 frst_ 1 4,996 11-08-2018, 19:17
Last Post: frst_
Tongue [Release] MW3 Shop plugin Dude 56 51,301 03-25-2018, 05:18
Last Post: [email protected]
  [Release] Permission plugin Pozzuh 202 163,920 05-01-2017, 15:41
Last Post: W4R||The Hyper
  [Release] FIXED SPEED PLUGIN hillbilly 2 5,656 06-02-2016, 20:23
Last Post: clacki
  [Release] Bots Plugin For Users Casper 22 39,849 08-22-2015, 17:45
Last Post: SnapBacks
  [Release] God Plugin v5.0 [Ingame Rcon Tool] OzonE 464 335,775 06-27-2015, 15:38
Last Post: bluedot
  [Release] Anti Hardscope Plugin 8q4s8 26 27,593 06-20-2015, 22:44
Last Post: urj88419
  [Release] ProMod Plugin zxz0O0 875 761,608 03-25-2015, 22:02
Last Post: kris
  [Release] [Discontinued] Speed Plugin Pozzuh 164 121,944 10-06-2014, 12:56
Last Post: Nekochan
  [help]how create a ping plugin clacki 3 5,076 09-13-2014, 01:23
Last Post: clacki

Forum Jump:


Users browsing this thread:
2 Guest(s)

Forum Powered By MyBB, Theme by © 2002-2026 Melroy van den Berg.