Half-Life и Adrenaline Gamer форум

Всё об игре в Халф-Лайф и АГ
Текущее время: 16 май 2024, 22:30

Часовой пояс: UTC + 5 часов [ Летнее время ]




Начать новую тему Ответить на тему  [ Сообщений: 10 ] 
Автор Сообщение
 Заголовок сообщения: Advanced Bans working with dproto
СообщениеДобавлено: 17 дек 2011, 20:38 
Не в сети
Зарегистрирован:
07 сен 2011, 12:20
Последнее посещение:
31 июл 2015, 18:31
Сообщения: 74
Hello guys!
Can you please help me with the plugin Advanced Bans By Exolent to make it work properly with dproto? I can't make a request on alliedmoders because their "nosteam=nosupport" thing... .
The original plugin is posted here http://forums.alliedmods.net/showthread.php?t=80858 (if it's not ok delete the link, my intention it's not to advertise).
It doesn't work with emulators, only with legit Steam because it has a way to detect real steam. I removed some code lines and now i can use the ban/unban/addban commands. The plugin modified by me it's working but on compile i get this error
Код:
/tmp/text2n6qPj.sma(1772) : warning 204: symbol is assigned a value that is never used: "g_IP_pattern"

This is the only error and the plugin it's working. I tried to remove lines related to "g_IP_pattern" but i get a lot of errors after that so i use it as it is right now.
I'll attach the source maybe you can help me because i'm don't know coding.


Вложения:
amxbans_modified.txt [49.43 КБ]
Скачиваний: 168

_________________
Изображение
Вернуться к началу
 Профиль 
  
 Заголовок сообщения: Re: Advanced Bans working with dproto
СообщениеДобавлено: 18 дек 2011, 06:11 
Не в сети
Аватара пользователя
Зарегистрирован:
06 июн 2010, 16:53
Последнее посещение:
16 май 2024, 11:06
Сообщения: 1143
Откуда: Владивосток
Try this.


Вложения:
advanced_bans.rar [23.21 КБ]
Скачиваний: 187

_________________
Изображение
Vi Veri Veniversum Vivus Vici
Вернуться к началу
 Профиль 
  
 Заголовок сообщения: Re: Advanced Bans working with dproto
СообщениеДобавлено: 18 дек 2011, 14:08 
Не в сети
Зарегистрирован:
07 сен 2011, 12:20
Последнее посещение:
31 июл 2015, 18:31
Сообщения: 74
amx_addban doesn't work on steamid from revemu and not even on ip.
amx_addban neo 89.172.149.31 1 test
[AdvancedBans] Invalid IP

amx_addban neo "STEAM_0:0:1452703325" 1 test
[AdvancedBans] Invalid SteamID!
[AdvancedBans] Correct format: STEAM_0:X:XXXXXX
That's not real steam, it's revEmu.

You have to remove some code lines this to work. On first post i did this and the command works....but with errors on compile.

For steamid i removed this

Код:
if( !is_ip && !IsValidAuthid(target_authid) )
   {
      console_print(client, "[AdvancedBans] %L", client, "AB_INVALID_STEAMID");
      console_print(client, "[AdvancedBans] %L", client, "AB_VALID_STEAMID_FORMAT");
      
      return PLUGIN_HANDLED;

and for ip

Код:
if( !IsValidIP(target_authid) )
      {
         console_print(client, "[AdvancedBans] %L", client, "AB_INVALID_IP");
         
         return PLUGIN_HANDLED;

I used AB_INVALID_STEAMIDand AB_INVALID_IP from .txt file to get to those lines and remove them but as i told i get one error on compile (/tmp/text2n6qPj.sma(1772) : warning 204: symbol is assigned a value that is never used: "g_IP_pattern") but the plugin get's compiled.

_________________
Изображение


Вернуться к началу
 Профиль 
  
 Заголовок сообщения: Re: Advanced Bans working with dproto
СообщениеДобавлено: 18 дек 2011, 14:58 
Не в сети
Site Admin
Зарегистрирован:
01 июн 2010, 01:27
Последнее посещение:
16 май 2024, 13:36
Сообщения: 6867
neoRT писал(а):
but with errors on compile
This wasn't an error. Just a warning that variable declared, assigned, but value never used.


Вернуться к началу
 Профиль 
  
 Заголовок сообщения: Re: Advanced Bans working with dproto
СообщениеДобавлено: 18 дек 2011, 16:03 
Не в сети
Зарегистрирован:
07 сен 2011, 12:20
Последнее посещение:
31 июл 2015, 18:31
Сообщения: 74
@Lev that warning can cause something wrong on server?
I've installed the plugin yesterday on my server and as far as I see it''s running properly... .

_________________
Изображение


Вернуться к началу
 Профиль 
  
 Заголовок сообщения: Re: Advanced Bans working with dproto
СообщениеДобавлено: 19 дек 2011, 00:00 
Не в сети
Site Admin
Зарегистрирован:
01 июн 2010, 01:27
Последнее посещение:
16 май 2024, 13:36
Сообщения: 6867
neoRT писал(а):
that warning can cause something wrong on server?
It can't be said without investigating code. If it works then I suppose that all is ok.


Вернуться к началу
 Профиль 
  
 Заголовок сообщения: Re: Advanced Bans working with dproto
СообщениеДобавлено: 19 дек 2011, 05:08 
Не в сети
Аватара пользователя
Зарегистрирован:
06 июн 2010, 16:53
Последнее посещение:
16 май 2024, 11:06
Сообщения: 1143
Откуда: Владивосток
neoRT,
I removed IsValidAuthid check, try.


Вложения:
Скачать плагин или Скачать исходник [advanced_bans.sma - 50 КБ]
Скачиваний: 273

_________________
Изображение
Vi Veri Veniversum Vivus Vici
Вернуться к началу
 Профиль 
  
 Заголовок сообщения: Re: Advanced Bans working with dproto
СообщениеДобавлено: 19 дек 2011, 15:32 
Не в сети
Зарегистрирован:
07 сен 2011, 12:20
Последнее посещение:
31 июл 2015, 18:31
Сообщения: 74
Thanks KORD_12.7. I uncommented mysql usage to use a web interface with this plugin's database :twisted:

_________________
Изображение


Вернуться к началу
 Профиль 
  
 Заголовок сообщения: Re: Advanced Bans working with dproto
СообщениеДобавлено: 20 дек 2011, 20:47 
Не в сети
Зарегистрирован:
07 сен 2011, 12:20
Последнее посещение:
31 июл 2015, 18:31
Сообщения: 74
I realised something: if you use amx_ban on a player that has p47 it will ban STEAM_ID_LAN, all p47 players. How to check clients if they use p47 or p48?
I removed code from plmenu.sma that does this check to give you an example of what i mean

the code i'm talking about looks like this:

Цитата:
if ( !equal("STEAM_0:", authid2, 8))
{
client_cmd(id, "amx_banip #%i %i ^"%s^"", userid2, g_menuSettings[id], reason);
}
else
{
client_cmd(id, "amx_ban #%i %i ^"%s^"", userid2, g_menuSettings[id], reason);
This code is used by amx_banmenu

_________________
Изображение


Вернуться к началу
 Профиль 
  
 Заголовок сообщения: Re: Advanced Bans working with dproto
СообщениеДобавлено: 21 дек 2011, 04:44 
Не в сети
Аватара пользователя
Зарегистрирован:
06 июн 2010, 16:53
Последнее посещение:
16 май 2024, 11:06
Сообщения: 1143
Откуда: Владивосток
I will look at code.

_________________
Изображение
Vi Veri Veniversum Vivus Vici


Вернуться к началу
 Профиль 
  
Показать сообщения за:  Поле сортировки  
Начать новую тему Ответить на тему  [ Сообщений: 10 ] 

Часовой пояс: UTC + 5 часов [ Летнее время ]


Кто сейчас на конференции

Сейчас этот форум просматривают: нет зарегистрированных пользователей и гости: 6


Вы не можете начинать темы
Вы не можете отвечать на сообщения
Вы не можете редактировать свои сообщения
Вы не можете удалять свои сообщения
Вы не можете добавлять вложения

Найти:
Перейти:  
Создано на основе phpBB® Forum Software © phpBB Group
Русская поддержка phpBB