PtokaX forum

Archive => Leviathan => AllInOne Scripts => Archived 5.1 boards => Leviathan - Bugs => Topic started by: eMTee on 06 April, 2008, 16:22:26

Title: Kick messages filtering changed in DC++ 0.705+ - solution for LV 3.1
Post by: eMTee on 06 April, 2008, 16:22:26
Hi all,
filtering kick messages in NMDC hubs was changed with DC++ 0.705 so it filters only when a string starts with <Username>.  If anybody still using 3.1 to keep profile compatibility here are the required changes in Functons.lua. It puts the botname before the the messages sent to kickbar.


Notify_Login = function(user,data)
if Prf[user.iProfile]["Notify_Login"] == string.lower("yes") then
SendToAll("<"..frmHub:GetHubBotName()..">*** "..Cvrt.P2[user.iProfile].." "..user.sName.." just logged in !! "..string.rep("\t",20).."is kicking because:")
user:SendData("<"..frmHub:GetHubBotName().."> <(,^^)>\tWelcome to: "..frmHub:GetHubName().." "..Cvrt.P2[user.iProfile].." "..user.sName.."\t<(^^,)>"..string.rep("\t",13).."is kicking because:")
end
Clear()
end

Notify_Logout = function(user,data)
if Prf[user.iProfile]["Notify_Login"] == string.lower("yes") then
SendToAll("<"..frmHub:GetHubBotName()..">*** "..Cvrt.P2[user.iProfile].." "..user.sName.." just logged off !! "..string.rep("\t",20).."is kicking because:")
end
Clear()
end
--

SendMessage = function(message,SendWhere)
if Cfg.Send_Kick_Ban_Where == "main" then
SendToOps(Cfg.Bot_Name,message)
elseif Cfg.Send_Kick_Ban_Where == "kickbar" then
SendToOps("<"..frmHub:GetHubBotName()..">"..message.." "..string.rep("\t",13).."is kicking because:")
elseif Cfg.Send_Kick_Ban_Where == "opchat" then
SendPmToOps(frmHub:GetOpChatName(),message)
elseif Cfg.Send_Kick_Ban_Where == "off" then
return 1
end
Clear()
end