fake kick messages

Releases and bugs in here...
yakko
Posts: 258
Joined: 2003-01-27 06:04

fake kick messages

Post by yakko » 2003-03-15 15:40

I don't know if this is a DC++ problem or a DCH++ one, but I didn't notice it until I moved my hub over to DCH++. If you type a accurate looking kick message like "Yakko is kicking stupiduser because: blah blah blah" and you have DC++ set to filter kicks then you'll see the kick message in the status bar. No kick actually happens, but any user can cause this.

Sedulus
Forum Moderator
Posts: 687
Joined: 2003-01-04 14:32

Post by Sedulus » 2003-04-01 20:36

well.. this is a dc++ issue. and a protocol issue.
the kick should have had the reason included in it's description.

but there are workarounds,
they won't fix dc++'s hiding normal people saying "... is kicking ... because..", but they'll fix so only valid kick messages are sent by HubNick. all other messages can be considered invalid
1) use OpComExtra-19-2
2) use the following script

Code: Select all

-- KickCorrector.lua
-- vim:ts=4:sw=4:noet

local last = {}


function dchpp.clientLine( user, data )
        if user:isOp() then
                local nick = user:getNick()
                if string.sub( data, 1, 5 ) == "$To: " then
                        local ret,c,to,from,msgnick,reason = string.find( data,
                                "%$To: ([^ ]+) From: ([^ ]+) %$<([^>]+)> You are being kicked because: (.*)|$" )
                        if ret and from == msgnick then
                                last.msg = "<"..nick.."> "..nick.." is kicking "..to.." because: "..reason.."|"
                                last.victim = to
                                last.reason = reason
                                last.done = 0
                                return
                        end
                elseif last.done == 0 and string.sub( data, 1, 1 ) == "<" then
                        if data == last.msg then
                                last.done = 1
                                return dchpp.ACTION_STOP
                        end
                elseif last.done == 1 and string.sub( data, 1, 6 ) == "$Kick " then
                        if string.sub( data, 7 ) == last.victim.."|" then
                                local ip = dchpp.getClient( last.victim )
                                if ip then
                                        ip = ip:getIp()
                                        dchpp.hubMessage( nick.." is kicking "..last.victim.." ("..ip..") because: "..last.reason )
                                        last = {}
                                        return
                                end
                        end
                end
                if last.done == 1 then
                        dchpp.sendToAll( last.msg )
                end
                last = {}
        end
end
http://dc.selwerd.nl/hublist.xml.bz2
http://www.b.ali.btinternet.co.uk/DCPlusPlus/index.html (TheParanoidOne's DC++ Guide)
http://www.dslreports.com/faq/dc (BSOD2600's Direct Connect FAQ)

Who is online

Users browsing this forum: Google [Bot] and 0 guests