English In game ban list.

12 replies
Goto Page
To the start Previous 1 Next To the start
09.09.13 08:20:18 pm
Up
H-X
User
Offline Off
hey guys if someone can make me a lua in which if i say !banlist and i get all the players list of ip's or USGN's which are banned.
Maths is the most magical place where you buy 70 watermelons and no one cares about it.
09.09.13 08:37:47 pm
Up
Rainoth
Moderator
Offline Off
You don't want to do it by using

Code:
1
(rcon) bans


in console ?
09.09.13 08:41:30 pm
Up
DarkBooy
User
Offline Off
user H-X has written:
hey guys if someone can make me a lua in which if i say !banlist and i get all the players list of ip's or USGN's which are banned.


Use Console this cmds IF you'r SERVER / RCON

cs2d cmd listbans
cs2d cmd bans
Vote for you'r favorite server [2012/2013] thread cs2d your Favourite Server & Enjoy on these maps file File does not exist (13871) & file cs2d de_fun_snow (3)
09.09.13 08:58:52 pm
Up
H-X
User
Offline Off
ya guys i know that but i have to open the console but if there is any kind of way that it comes like a message.I think you get my point that i don't need to open console.
Maths is the most magical place where you buy 70 watermelons and no one cares about it.
09.09.13 09:30:47 pm
Up
Rainoth
Moderator
Offline Off
I can't think of any other way besides saving the players IP whenever the user is banned and then show the list when you write your command. If there's another,easier way then I'm sorry for my inexperience. I won't be doing what I said as I'm not a friend of saving/loading.
09.09.13 10:42:26 pm
Up
EngiN33R
Moderator
Offline Off
This won't get temporary bans because I couldn't find a way to get them other than through using the output of the cs2d cmd bans (cs2d cmd listbans) command, and I'm not really in the mood to do that right now.

Code:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
addhook("say","getbanlist")
function getbanlist(id,txt)
     if (txt=="!banlist") then
          msg2(id,"----- List of Bans -----")
          local fh = io.open("sys/bans.lst","r")
          local bans = {}
          for line in fh:lines() do
               if line:sub(1,2)~="//" and #line>0 then
                    local mode,value = line:gsub("(.+)\t\t(.+)")()
                    local str = "* "
                    if mode == "banusgn" then
                         str = str .. "USGN ID #"
                    elseif mode == "banip" then
                         str = str .. "IP "
                    elseif mode == "banname" then
                         str = str .. "Name "
                    end
                    str = str .. value
                    bans[#bans+1] = str
               end
          end
          msg2(id,"bans total: "..#bans)
          for _,v in ipairs(bans) do
               msg2(id,v)
          end
          fh:close()
          return 1
     end
end
I code, therefore I exist. | Visit my blog for Lua tips and other interesting info
10.09.13 08:03:22 am
Up
H-X
User
Offline Off
Thx mate it work just the way i wanted.
you can take a cookie cookie
Maths is the most magical place where you buy 70 watermelons and no one cares about it.
10.09.13 02:14:20 pm
Up
Dimas541
User
Offline Off
@user EngiN33R: You give her the code there is an error
I was trying to use bots
I kept bans, and I wrote! banlist writing this only ----- List of Bans -----
IMG:http://i49.tinypic.com/fnn9w.png
IMG:http://i45.tinypic.com/23vf2q.png
file File does not exist (14217) <-- My Tibia Edited file cs2d CarMods (20) <-- My CarMods

Admin/mod comment:

Please don't quote long posts. /EngiN33R
10.09.13 02:20:35 pm
Up
H-X
User
Offline Off
Who the fuck is her?
Maths is the most magical place where you buy 70 watermelons and no one cares about it.
10.09.13 02:22:59 pm
Up
EngiN33R
Moderator
Offline Off
user Dimas541 has written:
@user EngiN33R: You give her the code there is an error
I was trying to use bots
I kept bans, and I wrote! banlist writing this only ----- List of Bans -----

Well, as far as I checked, it didn't have any errors. Mind at least saying what the error text is, if there is any?
I code, therefore I exist. | Visit my blog for Lua tips and other interesting info
10.09.13 02:23:39 pm
Up
MikuAuahDark
User
Offline Off
user Dimas541 has written:
@user EngiN33R: You give her the code there is an error
I was trying to use bots
I kept bans, and I wrote! banlist writing this only ----- List of Bans -----


Are you sure that there is also a "total bans: 0" message? if not then make sure that your CS2D have full-rights. If it's also showing "total bans: 0" then there is no banned players on your server
file cs2d LuaJIT for Dedicated Server (11) JIT POWER! | Know your Lua errors! | Draw stuff at Pixelize Art --xx-- server!
10.09.13 02:25:23 pm
Up
H-X
User
Offline Off
And i dont think bots get banned if you want to say that.
Maths is the most magical place where you buy 70 watermelons and no one cares about it.
12.09.13 12:18:16 am
Up
omg
User
Offline Off
yea, u cant really ban bots because theyre part of server. u have to ban an actual player. if u have dedicated server, u can actually ban urself and then remove the ban later
will code for food
To the start Previous 1 Next To the start