--// "Gekko 1.01 created by Phatty owner of uk-kingdom1.no-ip.org" --// "Feel free to edit, and if you do can you please come give me the first edit" --// "v1.01 created on 24th June 2k3" -- --//v1.01 - 24th June 2003 - Phatty --// -myip - Shows your current ip] --// -users - Shows amount of users currently in hub] --// -help - Shows the user help] --// -ophelp - Shows the advanced help for OPs] --// -userlimit - Show the limit set for amount of users] --// -addop - Gives OP status to a user] --// -delop - Deletes the OP status from a user] --// -repass - Changes your password] --// -kick - Kicks a user from hub with a tempban] --// -sethubname - Sets the hub name to be used] --// -hubname - Show the current hub name] -- --//v1.011 - 25th June 2003 - Phatty --// -rules - Reads the rules from rules.gek] --// -network - Read the network text file from nt.gek] --// -mass - Sends mass message] --// --// Added anti-advertising --// -- --//v1.0110 - 7th August 2003 - Phatty --// -website - Reads the hubs website list from webby.gek] --// --// --//Thanx to all the people that have gave me help for finding commands and helping me learn how to lua script....:) --//Current version : v1.011 Bot = "Gekko" trigs = {["dns2go"]=1,["myftpsite"]=2,["servebeer"]=3,["mine.nu"]=4,["ip.com"]=5,["dynip"]=6,["staticip"]=7,["serveftp"]=8,["ipactive"]=9,["ip.org"]=10,["no-ip"]=11,["servegame"]=12,["ath.cx"]=13,["dyndns"]=14,["68.67.18.75"]=15,["clanpimp"]=16,["idlegames"]=17,["sytes"]=18,["24.184.64.48"]=19,["uni.cc"]=20,["151.198.149.60"]=21,["homeunix"]=22,["24.209.232.97"]=23,["deftonzs.com"]=24,["24.187.50.121"]=25,["flamenap"]=26,["xs4all"]=27,["no-ip"]=28,["serveftp"]=29,["myftp"]=30,["d2g"]=31,["151.198.149.60"]=32,["24.184.64.48"]=33,["orgdns"]=34} function Main() frmHub:RegBot(Bot) end forbiddenWords = {"mldonkey"} function reguser(data) data=strsub(data,1,strlen(data)-1) s,e,whoTo,from = strfind(data,"$To:%s+(%S+)%s+From:%s+(%S+)%s+$%b<>%s+(%S+)") s,e,whoTo,from,data,us,pa = strfind(data,"$To:%s+(%S+)%s+From:%s+(%S+)%s+$%b<>%s+(%S+)%s+(%S+)%s+(%S+)%s*") return us,pa end function addop(data) data=strsub(data,1,strlen(data)-1) s,e,whoTo,from = strfind(data,"$To:%s+(%S+)%s+From:%s+(%S+)%s+$%b<>%s+(%S+)") s,e,whoTo,from,data,us,pa = strfind(data,"$To:%s+(%S+)%s+From:%s+(%S+)%s+$%b<>%s+(%S+)%s+(%S+)%s+(%S+)%s*") return us,pa end function renewpass(data) data=strsub(data,1,strlen(data)-1) s,e,whoTo,from = strfind(data,"$To:%s+(%S+)%s+From:%s+(%S+)%s+$%b<>%s+(%S+)") s,e,whoTo,from,data,us = strfind(data,"$To:%s+(%S+)%s+From:%s+(%S+)%s+$%b<>%s+(%S+)%s+(%S+)%s*") return us end function del(data) if( strsub(data, 1, 1) == "<" ) then data=strsub(data,1,strlen(data)-1) s,e,cmd = strfind( data, "%b<>%s+(%S+)" ) s,e,cmd,us = strfind( data, "%b<>%s+(%S+)%s+(%S+)%s*") return us end end function hbns(data) if( strsub(data, 1, 1) == "<" ) then data=strsub(data,1,strlen(data)-1) s,e,cmd = strfind( data, "%b<>%s+(%S+)" ) s,e,cmd,us = strfind( data, "%b<>%s+(%S+)%s+(%S+)%s*") return us end end function kick(data) if( strsub(data, 1, 1) == "<" ) then data=strsub(data,1,strlen(data)-1) s,e,cmd = strfind( data, "%b<>%s+(%S+)" ) s,e,cmd,us = strfind( data, "%b<>%s+(%S+)%s+(%S+)%s*") return us end end function OpConnected(curUser) SendToAll(Bot, "Operator "..curUser.sName.." has entered the hub.") curUser:SendData("<"..Bot.."> Hello "..curUser.sName.." and welcome to "..frmHub:GetHubName()) curUser:SendData("<"..Bot.."> Online users in this hub is: "..frmHub:GetUsersCount().. " users") curUser:SendData("<"..Bot.."> -=-=-=-=-=-=-=-=-=-=-") curUser:SendData("<"..Bot.."> This is the command for this hub") curUser:SendData("<"..Bot.."> -=-=-=-=-=-=-=-=-=-=-") curUser:SendData("<"..Bot.."> -hide This command will hide you from the eye") curUser:SendData("<"..Bot.."> -unhide This will show you to the eye") curUser:SendData("<"..Bot.."> -myip This will show your ip nr") curUser:SendData("<"..Bot.."> -users Show amount of users currently online") curUser:SendData("<"..Bot.."> -userlimit Shows the user limit in this hub") curUser:SendData("<"..Bot.."> -addop This will add a new op") curUser:SendData("<"..Bot.."> -delop This will delete a op") curUser:SendData("<"..Bot.."> -repass Change your password") curUser:SendData("<"..Bot.."> -kick Kick A user") curUser:SendData("<"..Bot.."> -sethubname Set a name for the hub") curUser:SendData("<"..Bot.."> -hubname This shows the hub name") curUser:SendData("<"..Bot.."> -ophelp This shows this window again") curUser:SendData("<"..Bot.."> -adduser This adds new user") curUser:SendData("<"..Bot.."> -deluser This will delete a user") curUser:SendData("<"..Bot.."> -=-=-=-=-=-=-=-=-=-=-") end function OpDisconnected(curUser) SendToAll(Bot, "Operator "..curUser.sName.." is now offline") end function NewUserConnected(curUser) curUser:SendData("<"..Bot.."> Hello and welcome to "..frmHub:GetHubName().."") curUser:SendData("<"..Bot.."> -users Show amount of users currently online") curUser:SendData("<"..Bot.."> -help Show this help") curUser:SendData("<"..Bot.."> -myip This will show the ip nr") for key,checkWord in forbiddenWords do if strfind(curUser.sMyInfoString, checkWord, 1, 1) then SendToNick(curUser.sName, "<" ..Bot.."> You are using a crap client go and get a different one then come back") SendToNick(curUser.sName, "<" ..Bot.."> Disconnecting...") curUser:Disconnect() end end end function DataArrival(user, data) s,e,whoTo = strfind(data,"$To:%s+(%S+)") if (whoTo == Bot) then if (user.bOperator) then if( strfind( strlower(data), strlower("-addop")) ) then us,pa = addop(data) frmHub:AddRegUser(us, pa, 1) answer= ""..user.sName.." New operator added to the hub user: "..us.."" user:SendPM(Bot, answer ) end end end if (not user.bOperator) then if (( strsub(data, 1, 1) == "<" ) or ( strsub(data, 1, 4) == "$To:" )) then for key,a in trigs do if( strfind( strlower(data), key) ) then SendToAll( bot, user.sName.." has been kicked because of advertising." ) user:Disconnect() end end end end if(user.bOperator and strsub(data, 1, strlen(user.sName)+8) == "<"..user.sName.."> mass ") then SendPmToAll("Hub Mass Message from "..user.sName, strsub(data, strlen(user.sName)+9)) end if( strfind( strlower(data), strlower("-dev")) ) then answer= "".."\r\n".."This hub is Runnig Gekko v.1.01".."\r\n".."Made by Xider".."\r\n".."-=-=-=-=-=-=-=-=-=-=-".."\r\n".."Hub Information".."\r\n".."=0=0=0=0=0=".."\r\n".."Hub Name: "..frmHub:GetHubName().."".."\r\n".."Hub Description: "..frmHub:GetHubDescr().."".."\r\n".."The Redrict adress: "..frmHub:GetRedirectAddress().."".."\r\n".."The Register adress: "..frmHub:GetRegServer().."".."\r\n".."Max user limit: "..frmHub:GetMaxUsers().."".."\r\n".."The online users: "..frmHub:GetUsersCount().."".."\r\n".."The Gekko´s name is: "..Bot.."".."\r\n".."".."\r\n".."-=-=-=-=-=-=-=-=-=-=-".."\r\n".."Client Information".."\r\n".."=0=0=0=0=0=".."\r\n".."Your Client Version: "..user.iVersion.."".."\r\n".."Your ip nr is: "..user.sIP.."" user:SendPM(Bot, answer ) end if( strsub(data, 1, 1) == "<" ) then if( strfind( strlower(data), strlower("-users")) ) then answer= "Users online right now is: "..frmHub:GetUsersCount().."" user:SendPM(Bot, answer ) end end if( strsub(data, 1, 1) == "<" ) then if( strfind( strlower(data), strlower("-help")) ) then answer= "".."\r\n".."This is the command for this hub".."\r\n".."-myip This will show your ip nr".."\r\n".."-users show how many users that is online".."\r\n".."-help show this text" user:SendPM(Bot, answer) end end if( strsub(data, 1, 1) == "<" ) then if( strfind( strlower(data), strlower("-rules")) ) then readfrom("files/rules.gek") while 1 do line = read() if line == nil then break end user:SendPM("Gekko",line) end readfrom() end end if( strsub(data, 1, 1) == "<" ) then if( strfind( strlower(data), strlower("-network")) ) then readfrom("files/nt.gek") while 1 do line = read() if line == nil then break end user:SendPM("Gekko",line) end readfrom() end end if( strsub(data, 1, 1) == "<" ) then if( strfind( strlower(data), strlower("-website")) ) then readfrom("files/webby.gek") while 1 do line = read() if line == nil then break end user:SendPM("Gekko",line) end readfrom() end end if( strsub(data, 1, 1) == "<" ) then if (user.bOperator) then if( strfind( strlower(data), strlower("-ophelp")) ) then answer= "".."\r\n".."This is the command for this hub".."\r\n".."-myip This will show your ip n".."\r\n".."-users Show how many users that is online".."\r\n".."-userlimit Shows the user limit in this hub".."\r\n".."-addop This add a new op".."\r\n".."-delop This delete a op".."\r\n".."-repass This will change your password".."\r\n".."-kick This would kick the user".."\r\n".."-sethubname This would set a name to the hub".."\r\n".."-hubname This shows the hub name".."\r\n".."-ophelp This shows this window again".."\r\n".."" user:SendPM(Bot, answer) end end end if( strsub(data, 1, 1) == "<" ) then if (user.bOperator) then if( strfind( strlower(data), strlower("-delop")) ) then us = delop(data) frmHub:DelRegUser(us) answer= ""..user.sName.." Delete operator: "..us.."" user:SendPM(Bot, answer) end end end if (user.bOperator) then if( strfind( strlower(data), strlower("-repass")) ) then us = renewpass(data) frmHub:DelRegUser(us) frmHub:AddRegUser(user.sName, us, 1) answer= ""..user.sName.." You have change your password your new password is: "..us.."" user:SendPM(Bot, answer) end end if( strsub(data, 1, 1) == "<" ) then if (user.bOperator) then if( strfind( strlower(data), strlower("-userlimit")) ) then answer= "The user limit: "..frmHub:GetMaxUsers().."" user:SendPM(Bot, answer) end end end if( strsub(data, 1, 1) == "<" ) then if (user.bOperator) then if( strfind( strlower(data), strlower("-kick")) ) then us = kick(data) GetItemByName(us) DisconnectByName(us) SendToAll(Bot, "User: "..us.." has been kicked by "..user.sName.."") end end end if( strsub(data, 1, 1) == "<" ) then if (user.bOperator) then if( strfind( strlower(data), strlower("-sethubname")) ) then us = hbns(data) frmHub:SetHubName(us) answer= "The Hub name is now: "..us.."" user:SendPM(Bot, answer) end end end if( strsub(data, 1, 1) == "<" ) then if (user.bOperator) then if( strfind( strlower(data), strlower("-hubname")) ) then answer= "The Hub name is "..frmHub:GetHubName().."" user:SendPM(Bot, answer) end end end if (user.bOperator) then if( strfind( strlower(data), strlower("-adduser")) ) then us,pa = reguser(data) frmHub:AddRegUser(us, pa, 0) answer= ""..user.sName.." New User added to the hub user: "..us.."" user:SendPM(Bot, answer ) end end if( strfind( strlower(data), strlower("-myip")) ) then answer= "Your IP-Nr is: "..user.sIP.."" user:SendPM(Bot, answer ) end if (user.bOperator) then if( strfind( strlower(data), strlower("-hide")) ) then frmHub:UnregBot(user.sName) end end if (user.bOperator) then if( strfind( strlower(data), strlower("-unhide")) ) then frmHub:RegBot(user.sName) end end if( strsub(data, 1, 1) == "<" ) then if (user.bOperator) then if( strfind( strlower(data), strlower("-deluser")) ) then us = del(data) frmHub:DelRegUser(us) answer= ""..user.sName.." Delete user: "..us.."" user:SendPM(Bot, answer) end end end if strsub(data, 1, 9+strlen(Bot)) == "$GetINFO "..Bot then user:SendData("$MyINFO $ALL "..Bot.." Gekko v.1.01$ $LAN(T3)\001$$0$") end end