This site is a testing version, but all data is shared with the live forum.


Raised This Month: $ Target: $400
 0% 

HLDS IRC edit join/quit(127.0.0.1)


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
hcxx
Senior Member
Join Date: Jan 2007
Location: 127.0.0.1
Old 04-09-2010 , 10:34   HLDS IRC edit join/quit(127.0.0.1)
Reply With Quote #1

This is a part of hlds irc.sma I want that if player ip is 127.0.0.1 then it dosent say to irc that this user has joined the server. I want this because I use ambot detector in my server and the aimbot detect bot spamm my irc channel whit join and left msgs

(17:28:00) (bot) [left][xyz41][127.0.0.1]

how can I make if the client ip is 127.0.0.1 then plugin will go
return PLUGIN_HANDLED?

PHP Code:
public client_putinserver(id)
{
    if (
irc_socket && get_cvar_num("irc_showjoins") == 1  && get_cvar_num("mp_timelimit")*60-get_timeleft() > 60
    {
        new 
tmsg[1024]
        
get_cvar_string("irc_msg_srvjoin",tmsg,1024)
        if (
strlen(tmsg) == 0
            return 
0
        parsemessage
(id,tmsg,temp,"")
        
format(temp,1024,"PRIVMSG %s :%s^r^n",chan,temp)
        
additem(temp)
    }
    return 
0

PHP Code:
public client_disconnect(id
{
    if (
irc_socket && get_cvar_num("irc_showjoins") == 1
    {
        new 
tmsg[1024]
        
get_cvar_string("irc_msg_srvpart",tmsg,1024)
        if (
strlen(tmsg) == 0)
            return 
0
        parsemessage
(id,tmsg,temp,"")
        
format(temp,1024,"PRIVMSG %s :%s^r^n",chan,temp)
        
additem(temp)
    }
    return 
0

hcxx is offline
Old 04-14-2010, 17:21
hcxx
This message has been deleted by YamiKaitou. Reason: bump
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:34.


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