Dim Ver Ver="R 1.1.0" Sub Msg(Where, Text, SN) If Where <> "" And Text <> "" Then SendCommand "/msg " & Where & " " & Text, SN End If End Sub Sub Ntc(Where, Text, SN) If Where <> "" And Text <> "" Then SendCommand "/notice " & Where & " " & Text, SN End If End Sub Function MsgAfter(Txt, Amt) Dim eAmt eAmt = Amt * 2 - 2 For i = 0 To (Amt - 1) eAmt = eAmt + Len(Txt(i)) Next MsgAfter = Mid(Join(Txt), eAmt) End Function Sub ONKICK(Nickname,Host,Channel,WhoKicked,Reason,ServerNumber) If nickname=GetIdentifier("$me",ServerNumber) then SendCommand "/join " & Channel & "",ServerNumber End If End Sub Sub ONQUERY(Message,Nickname,Host,ServerNumber) words = split(message," ") If Getinifile("Settings.txt","Settings","Tool","")="" then Writeinifile "Settings.txt","Settings","Tool","&" Tool = Getinifile("Settings.txt","Settings","Tool","") SendCommand "/timer close" & Nickname & " 1 1 /closequery ",ServerNumber Num = "0" Thumb = "" SPcount = Len(Nickname) Do while not Num = SPcount -- 1 Num = Num -- 1 If not Mid(Left(Nickname,Num -- 0),Num -- 0)="|" and Not Mid(Left(Nickname,Num -- 0),Num -- 0)="[" and Not Mid(Left(Nickname,Num -- 0),Num -- 0)="]" and not Mid(Left(Nickname,Num -- 0),Num -- 0)="" then Thumb = Thumb + "" & Mid(Left(Nickname,Num -- 0),Num -- 0) & "" End If Loop If GetIniFile("Spammers.txt","Count",Thumb,"")="" then Writeinifile"Spammers.txt","Count",Thumb,"0" End If If GetIniFile("Spammers.txt","Count",Thumb,"")>"1" then Sendcommand "/ignore " & Thumb & "",ServerNumber Sendcommand "/timer " & Thumb & "1 1 30 /ignore " & Thumb & "",ServerNumber Writeinifile"Spammers.txt","Count",Thumb,"" Sendcommand "/timer " & Thumb & " off" Exit Sub Else Writeinifile"Spammers.txt","Count",Thumb,GetIniFile("Spammers.txt","Count",Thumb,"") -- 1 Sendcommand "/timer " & Thumb & " off" Sendcommand "/timer " & Thumb & " 1 2 /! FixNick " & Thumb & "",ServerNumber End If If not Left(Message,1)="#" or not Left(Mid(Message,Len(Words(0))-- 2),1)=Tool then Ntc Nickname, "Proper syntax is #Channel " & Tool & "Command Arguments",ServerNumber Exit Sub ElseIf Lcase(Words(1))="&toolreset" then If not GetIniFile("" & words(0) & ".txt",Getidentifier("$mask(" & Nickname & "!" & Host & ",2)"),"Protect","") ="Yes" or not words(0)=Getinifile("Settings.txt","Settings","Channel","") then Ntc Nickname, "Error: No permission!", ServerNumber Elseif Getinifile("Settings.txt","Settings","Tool","") = "&" then Ntc Nickname, "Error: You already have this as your current tool!", ServerNumber Else Writeinifile"Settings.txt","Settings","Tool","&" Ntc Nickname, "Success: Your new tool is " & Getinifile("Settings.txt","Settings","Tool",""), ServerNumber End If ElseIf Lcase(words(1))="" & Tool & "override" then If words(3) = Getinifile("Settings.txt","Settings","Pass","") then If not Getidentifier("$mask(" & Nickname & "!" & Host & ",2)")="$null" then If GetIniFile("" & words(0) & ".txt",Getidentifier("$mask(" & Nickname & "!" & Host & ",2)"),"Nick", "") = Nickname or GetIniFile("" & words(0) & ".txt",Getidentifier("$mask(" & Nickname & "!" & Host & ",2)"),"Admin", "")="" then If not GetIniFile("" & words(0) & ".txt",Nickname,"Host","") = "" and not GetIniFile("" & words(0) & ".txt",Nickname,"Host","") = Getidentifier("$mask(" & Nickname & "!" & Host & ",2)") then Ntc Nickname, "Error: Please use another nickname to avoid account conflict.", ServerNumber Exit Sub End If Select Case Lcase(words(2)) Case 1 If GetIniFile("" & words(0) & ".txt",Getidentifier("$mask(" & Nickname & "!" & Host & ",2)"),"Admin","") = "Yes" then Ntc Nickname, "Error: You already have admin!", ServerNumber Exit Sub Else WriteIniFile"" & words(0) & ".txt",Getidentifier("$mask(" & Nickname & "!" & Host & ",2)"),"Nick", Nickname WriteIniFile"" & words(0) & ".txt",Getidentifier("$mask(" & Nickname & "!" & Host & ",2)"),"Host", Getidentifier("$mask(" & Nickname & "!" & Host & ",2)") WriteIniFile"" & words(0) & ".txt",Getidentifier("$mask(" & Nickname & "!" & Host & ",2)"),"Mod","Yes" WriteIniFile"" & words(0) & ".txt",Getidentifier("$mask(" & Nickname & "!" & Host & ",2)"),"Admin","Yes" WriteIniFile"" & words(0) & ".txt",Getidentifier("$mask(" & Nickname & "!" & Host & ",2)"),"Protect","No" WriteIniFile"" & words(0) & ".txt",GetIniFile("" & words(0) & ".txt",Getidentifier("$mask(" & Nickname & "!" & Host & ",2)"),"Nick",""),"Host",Getidentifier("$mask(" & Nickname & "!" & Host & ",2)") End If Case 2 If GetIniFile("" & words(0) & ".txt",Getidentifier("$mask(" & Nickname & "!" & Host & ",2)"),"Protect","") = "Yes" then Ntc Nickname, "Error: You already have protection!", ServerNumber Exit Sub Else WriteIniFile"" & words(0) & ".txt",Getidentifier("$mask(" & Nickname & "!" & Host & ",2)"),"Nick", Nickname WriteIniFile"" & words(0) & ".txt",Getidentifier("$mask(" & Nickname & "!" & Host & ",2)"),"Host", Getidentifier("$mask(" & Nickname & "!" & Host & ",2)") WriteIniFile"" & words(0) & ".txt",Getidentifier("$mask(" & Nickname & "!" & Host & ",2)"),"Mod","Yes" WriteIniFile"" & words(0) & ".txt",Getidentifier("$mask(" & Nickname & "!" & Host & ",2)"),"Admin","Yes" WriteIniFile"" & words(0) & ".txt",Getidentifier("$mask(" & Nickname & "!" & Host & ",2)"),"Protect","Yes" WriteIniFile"" & words(0) & ".txt",Getidentifier("$mask(" & Nickname & "!" & Host & ",2)"),"Special","Yes" WriteIniFile"" & words(0) & ".txt",GetIniFile("" & words(0) & ".txt",Getidentifier("$mask(" & Nickname & "!" & Host & ",2)"),"Nick",""),"Host",Getidentifier("$mask(" & Nickname & "!" & Host & ",2)") End If Case 3 If Lcase(Words(4)) = "script" then Ntc Nickname, "Sending you your latest revision...", ServerNumber SendCommand "/dcc send " & Nickname & " authscript.ice",ServerNumber Exit Sub ElseIf Getinifile("" & Words(4) & ".txt","Register","Allowed","")="" then Ntc Nickname, "Error: This channel or command does not exist!", ServerNumber Exit Sub ElseIf not Getinifile("" & Words(4) & ".txt","Register","Allowed","")="" then Ntc Nickname, "Sending you your requested channel info...", ServerNumber SendCommand "/dcc send " & Nickname & " " & Words(4) & ".txt",ServerNumber Exit Sub End If Case Else Exit Sub End Select SendCommand "/mode " & words(0) & " +o " & Nickname & "",ServerNumber Msg words(0), Nickname & " has used override!", ServerNumber Else Ntc Nickname, "Error: Please change your name to your registered nickname before proceeding!", ServerNumber End If Else Ntc Nickname, "Error: Please join " & words(0) & " before using this command", ServerNumber End If Else Ntc Nickname, "Error: Wrong password!", ServerNumber End If End If If Left(words(1),1) = Tool Then Select Case Replace(LCase(words(1)),Tool,"") Case "message", "msg" Sendcommand "/! Ontext " & Mid(Message,Len(words(0)) -- 1) & "|" & words(0) & "|" & Nickname & "|" & Host & "|" & ServerNumber & "" Case "chaninfo", "botinfo", "userlist", "allowpm", "help", "register", "unregister", "spam", "users", "autovoice", "invite", "up", "down", "setinfo", "newchan", "topic", "seen", "registration", "flip", "fix", "sync", "move", "trefresh", "me", "note", "kick", "k", "setop", "unban", "ub", "snuggle", "undoban", "udb", "sorry", "user", "ban", "b", "suspend", "unsuspend", "addban", "delban", "banlist", "restrict", "unrestrict", "greet", "infolock", "dtopic", "tool", "clearinfo", "op", "deop", "voice", "v", "devoice", "dv", "moderate", "demoderate", "admin", "deadmin", "checkop", "deluser" If GetIniFile("" & words(0) & ".txt","Allowpm","Set","")="No" then Ntc Nickname, "Error: PM commands have been disabled by request on " & Words(0) & "",ServerNumber Else Sendcommand "/! Ontext " & Mid(Message,Len(words(0)) -- 1) & "|" & words(0) & "|" & Nickname & "|" & Host & "|" & ServerNumber & "" End If Case "pass" If not Getinifile("Settings.txt","Settings","Channel","")="" then Exit Sub ElseIf not IsOp(Nickname,words(0),ServerNumber) or not IsOp(Getidentifier("$me",ServerNumber),words(0),ServerNumber) then Ntc Nickname, "Setup error: We must both be opped!",ServerNumber Elseif Mid(Message, Len(Words(0)) + Len(words(1)) -- 2)="" then Ntc Nickname, "Please state a password to use",ServerNumber Elseif not Len(Words(2)) > 5 then Ntc Nickname, "Error, please use a password that is 6 characters long or longer!",ServerNumber Else WriteIniFile"Settings.txt","Settings","Channel",words(0) WriteIniFile"Settings.txt","Settings","Pass",words(2) WriteIniFile"Settings.txt","Settings","Bhost",GetIdentifier("$mask($nick(" & words(0) & ",$me).mask,2)",ServerNumber) writeIniFile"Settings.txt","Settings","Users","0" writeIniFile"Settings.txt","Settings","Tool","&" Bhost = GetIdentifier("$mask($nick(" & words(0) & ",$me).mask,2)",ServerNumber) WriteIniFile"" & words(0) & ".txt","Register","Allowed","Yes" writeIniFile"" & words(0) & ".txt","op","Set","1" writeIniFile"" & words(0) & ".txt","DCC","Allowed","2" WriteIniFile"" & words(0) & ".txt","Topic","Ident","Welcome to " & words(0) & " ||" WriteIniFile"" & words(0) & ".txt","Topic","Topic","" WriteIniFile"" & words(0) & ".txt","Topic","Lock","Off" Writeinifile"" & words(0) & ".txt","Joinmsg","Msg","Welcome back!" WriteIniFile"" & words(0) & ".txt","Allowpm","Set","Yes" WriteIniFile"" & words(0) & ".txt","Spam","Nospam","Off" WriteIniFile"" & words(0) & ".txt","Spam","Message","0" WriteIniFile"" & words(0) & ".txt","Spam","Num","4" WriteIniFile"" & words(0) & ".txt","Spam","Ops","On" Writeinifile"" & words(0) & ".txt","Modecheck","Enable","Off" WriteIniFile"" & words(0) & ".txt",Bhost,"Nick",Getidentifier("$me",ServerNumber) WriteIniFile"" & words(0) & ".txt",Bhost,"Host",Bhost WriteIniFile"" & words(0) & ".txt",Bhost,"Mod","Yes" WriteIniFile"" & words(0) & ".txt",Bhost,"Admin","Yes" WriteIniFile"" & words(0) & ".txt",Bhost,"Protect","Yes" WriteIniFile"" & words(0) & ".txt",Bhost,"Join","Bot Reactivated" WriteIniFile"" & words(0) & ".txt",GetIdentifier("$mask($nick(" & words(0) & "," & Nickname & ").mask,2)",ServerNumber),"Nick", Nickname WriteIniFile"" & words(0) & ".txt",GetIdentifier("$mask($nick(" & words(0) & "," & Nickname & ").mask,2)",ServerNumber),"Host", GetIdentifier("$mask($nick(" & words(0) & "," & Nickname & ").mask,2)",ServerNumber) WriteIniFile"" & words(0) & ".txt",GetIdentifier("$mask($nick(" & words(0) & "," & Nickname & ").mask,2)",ServerNumber),"Mod","Yes" WriteIniFile"" & words(0) & ".txt",GetIdentifier("$mask($nick(" & words(0) & "," & Nickname & ").mask,2)",ServerNumber),"Admin","Yes" WriteIniFile"" & words(0) & ".txt",GetIdentifier("$mask($nick(" & words(0) & "," & Nickname & ").mask,2)",ServerNumber),"Protect","Yes" WriteIniFile"" & words(0) & ".txt",GetIniFile("" & words(0) & ".txt",GetIdentifier("$mask($nick(" & words(0) & "," & Nickname & ").mask,2)",ServerNumber),"Nick",""),"Host",GetIdentifier("$mask($nick(" & words(0) & "," & Nickname & ").mask,2)",ServerNumber) Ntc Nickname, "You are now registered as " & Nickname & " $mask($nick(" & words(0) & "," & Nickname & ").mask,2) ",ServerNumber Ntc Nickname, "Your command access list can be found using " & Tool & "Help. Get info about a command via " & Tool & "Help ",ServerNumber Ntc Nickname, "Check to make sure everything worked right by typing " & Tool & "Botinfo. Thank you for using authscript!",ServerNumber End If End Select End If End Sub Sub ONJOIN(Nickname,Host,Channel,ServerNumber) If Nickname=GetIdentifier("$me",ServerNumber) then if not GetIniFile("" & Channel & ".txt",GetIdentifier("$mask($nick(" & Channel & "," & Nickname & ").mask,2)",ServerNumber),"Join","")="" then SendCommand "/timer " & Channel & "" & Nickname & " 1 1 /msg " & Channel & " " & Nickname & ": " & GetIniFile("" & Channel & ".txt",GetIdentifier("$mask($nick(" & Channel & "," & Nickname & ").mask,2)",ServerNumber),"Join","") & "",ServerNumber End If Exit Sub End if Bcheck="51" Bmsg = GetIdentifier("$mask($nick(" & Channel & "," & Nickname & ").mask,2)",ServerNumber) Do while not Bcheck < "1" Bcheck = Bcheck - 1 If Lcase(GetIniFile("" & channel & ".txt","Blist",Bcheck,"")) = Lcase(Bmsg) then Sendcommand "/mode " & channel & " +b " & GetIniFile("" & channel & ".txt","Blist",Bcheck,"") & "",ServerNumber Msggn = Split(GetIniFile("" & channel & ".txt","Blist","" & Bcheck & "i","")," ") Sendcommand "/kick " & channel & " " & Nickname & " " & Mid(GetIniFile("" & channel & ".txt","Blist","" & Bcheck & "i",""),Len(Msggn(0)) + Len(Msggn(1)) -- 3) & "",ServerNumber Exit Sub ElseIf InStr(Lcase(Bmsg),Lcase(GetIniFile("" & channel & ".txt","Blist",Bcheck,""))) and not GetIniFile("" & channel & ".txt","Blist",Bcheck,"") = "" then Sendcommand "/mode " & channel & " +b " & GetIniFile("" & channel & ".txt","Blist",Bcheck,"") & "",ServerNumber Msggn = Split(GetIniFile("" & channel & ".txt","Blist","" & Bcheck & "i","")," ") Sendcommand "/kick " & channel & " " & Nickname & " " & Mid(GetIniFile("" & channel & ".txt","Blist","" & Bcheck & "i",""),Len(Msggn(0)) + Len(Msggn(1)) -- 3) & "",ServerNumber Exit Sub End If Loop If GetIniFile("" & Channel & ".txt",GetIdentifier("$mask($nick(" & Channel & "," & Nickname & ").mask,2)",ServerNumber),"Admin","")="Yes" then If not getinifile("" & Channel & ".txt",GetIdentifier("$mask($nick(" & Channel & "," & Nickname & ").mask,2)",ServerNumber),"Op","")="Off" and not GetIniFile("" & Channel & ".txt","op","Set","")="0" then SendCommand "/mode " & Channel & " +o " & Nickname & "",ServerNumber ElseIf GetIniFile("" & Channel & ".txt",GetIdentifier("$mask($nick(" & Channel & "," & Nickname & ").mask,2)",ServerNumber),"Protect","")="Yes" and not getinifile("" & Channel & ".txt",GetIdentifier("$mask($nick(" & Channel & "," & Nickname & ").mask,2)",ServerNumber),"Op","")="Off" then SendCommand "/mode " & Channel & " +o " & Nickname & "",ServerNumber Else SendCommand "/mode " & Channel & " +v " & Nickname & "",ServerNumber End If If Left(GetIniFile("" & Channel & ".txt",GetIdentifier("$mask($nick(" & Channel & "," & Nickname & ").mask,2)",ServerNumber),"Join",""),1)="&" then Ntc Nickname, "" & Nickname & ", your join information was cleared by " & Mid(GetIniFile("" & Channel & ".txt",GetIdentifier("$mask($nick(" & Channel & "," & Nickname & ").mask,2)",ServerNumber),"Join",""),3) & "",ServerNumber WriteIniFile"" & Channel & ".txt",GetIdentifier("$mask($nick(" & Channel & "," & Nickname & ").mask,2)",ServerNumber),"Join","" ElseIf not GetIniFile("" & Channel & ".txt",GetIdentifier("$mask($nick(" & Channel & "," & Nickname & ").mask,2)",ServerNumber),"Join","")="" and not Lcase(GetIniFile("" & Channel & ".txt",GetIdentifier("$mask($nick(" & Channel & "," & Nickname & ").mask,2)",ServerNumber),"Join",""))="off" then SendCommand "/timer " & Channel & "" & Nickname & " 1 1 /msg " & Channel & " " & Nickname & ": " & GetIniFile("" & Channel & ".txt",GetIdentifier("$mask($nick(" & Channel & "," & Nickname & ").mask,2)",ServerNumber),"Join","") & "",ServerNumber ElseIf GetIniFile("" & Channel & ".txt",GetIdentifier("$mask($nick(" & Channel & "," & Nickname & ").mask,2)",ServerNumber),"Join","")="" and not Lcase(GetIniFile("" & Channel & ".txt",GetIdentifier("$mask($nick(" & Channel & "," & Nickname & ").mask,2)",ServerNumber),"Join",""))="off" and not Getinifile("" & Channel & ".txt","Joinmsg","Msg","")="&" then Ntc Nickname, "" & Channel & ": " & Getinifile("" & Channel & ".txt","Joinmsg","Msg","") & "",ServerNumber End If WriteIniFile"" & Channel & ".txt",GetIdentifier("$mask($nick(" & Channel & "," & Nickname & ").mask,2)",ServerNumber),"Seen",Date ElseIf GetIniFile("" & Channel & ".txt",GetIdentifier("$mask($nick(" & Channel & "," & Nickname & ").mask,2)",ServerNumber),"Mod","")="Yes" then If not getinifile("" & Channel & ".txt",GetIdentifier("$mask($nick(" & Channel & "," & Nickname & ").mask,2)",ServerNumber),"Op","")="Off" and GetIniFile("" & Channel & ".txt","op","Set","")="2" then SendCommand "/mode " & Channel & " +o " & Nickname & "",ServerNumber Else SendCommand "/mode " & Channel & " +v " & Nickname & "",ServerNumber End If If Left(GetIniFile("" & Channel & ".txt",GetIdentifier("$mask($nick(" & Channel & "," & Nickname & ").mask,2)",ServerNumber),"Join",""),1)="&" then Ntc Nickname, "" & Nickname & ", your join information was cleared by " & Mid(GetIniFile("" & Channel & ".txt",GetIdentifier("$mask($nick(" & Channel & "," & Nickname & ").mask,2)",ServerNumber),"Join",""),3) & "",ServerNumber WriteIniFile"" & Channel & ".txt",GetIdentifier("$mask($nick(" & Channel & "," & Nickname & ").mask,2)",ServerNumber),"Join","" ElseIf not GetIniFile("" & Channel & ".txt",GetIdentifier("$mask($nick(" & Channel & "," & Nickname & ").mask,2)",ServerNumber),"Join","")="" and not Lcase(GetIniFile("" & Channel & ".txt",GetIdentifier("$mask($nick(" & Channel & "," & Nickname & ").mask,2)",ServerNumber),"Join",""))="off" then SendCommand "/timer " & Channel & "" & Nickname & " 1 1 /msg " & Channel & " " & Nickname & ": " & GetIniFile("" & Channel & ".txt",GetIdentifier("$mask($nick(" & Channel & "," & Nickname & ").mask,2)",ServerNumber),"Join","") & "",ServerNumber ElseIf GetIniFile("" & Channel & ".txt",GetIdentifier("$mask($nick(" & Channel & "," & Nickname & ").mask,2)",ServerNumber),"Join","")="" and not Lcase(GetIniFile("" & Channel & ".txt",GetIdentifier("$mask($nick(" & Channel & "," & Nickname & ").mask,2)",ServerNumber),"Join",""))="off" and not Getinifile("" & Channel & ".txt","Joinmsg","Msg","")="&" then Ntc Nickname, "" & Channel & ": " & Getinifile("" & Channel & ".txt","Joinmsg","Msg","") & "",ServerNumber End If WriteIniFile"" & Channel & ".txt",GetIdentifier("$mask($nick(" & Channel & "," & Nickname & ").mask,2)",ServerNumber),"Seen",Date ElseIf GetIniFile("" & Channel & ".txt",GetIdentifier("$mask($nick(" & Channel & "," & Nickname & ").mask,2)",ServerNumber),"Host","")=GetIdentifier("$mask($nick(" & Channel & "," & Nickname & ").mask,2)",ServerNumber) then SendCommand "/mode " & Channel & " +v " & Nickname & "",ServerNumber If Left(GetIniFile("" & Channel & ".txt",GetIdentifier("$mask($nick(" & Channel & "," & Nickname & ").mask,2)",ServerNumber),"Join",""),1)="&" then Ntc Nickname, "" & Nickname & ", your join information was cleared by " & Mid(GetIniFile("" & Channel & ".txt",GetIdentifier("$mask($nick(" & Channel & "," & Nickname & ").mask,2)",ServerNumber),"Join",""),3) & "",ServerNumber WriteIniFile"" & Channel & ".txt",GetIdentifier("$mask($nick(" & Channel & "," & Nickname & ").mask,2)",ServerNumber),"Join","" ElseIf not GetIniFile("" & Channel & ".txt",GetIdentifier("$mask($nick(" & Channel & "," & Nickname & ").mask,2)",ServerNumber),"Join","")="" and not Lcase(GetIniFile("" & Channel & ".txt",GetIdentifier("$mask($nick(" & Channel & "," & Nickname & ").mask,2)",ServerNumber),"Join",""))="off" then SendCommand "/timer " & Channel & "" & Nickname & " 1 1 /msg " & Channel & " " & Nickname & ": " & GetIniFile("" & Channel & ".txt",GetIdentifier("$mask($nick(" & Channel & "," & Nickname & ").mask,2)",ServerNumber),"Join","") & "",ServerNumber ElseIf GetIniFile("" & Channel & ".txt",GetIdentifier("$mask($nick(" & Channel & "," & Nickname & ").mask,2)",ServerNumber),"Join","")="" and not Lcase(GetIniFile("" & Channel & ".txt",GetIdentifier("$mask($nick(" & Channel & "," & Nickname & ").mask,2)",ServerNumber),"Join",""))="off" and not Getinifile("" & Channel & ".txt","Joinmsg","Msg","")="&" then Ntc Nickname, "" & Channel & ": " & Getinifile("" & Channel & ".txt","Joinmsg","Msg","") & "",ServerNumber End If WriteIniFile"" & Channel & ".txt",GetIdentifier("$mask($nick(" & Channel & "," & Nickname & ").mask,2)",ServerNumber),"Seen",Date Elseif not getIniFile("" & Channel & ".txt","Register","Allowed","")="" then If not Getinifile("" & Channel & ".txt","Joinmsg","Msg","")="&" then Ntc Nickname, "" & Channel & ": " & Getinifile("" & Channel & ".txt","Joinmsg","Msg","") & "",ServerNumber End If If Getinifile("" & Channel & ".txt","av","av","")="1" then SendCommand "/mode " & Channel & " +v " & Nickname & "",ServerNumber End If ElseIf getIniFile("" & Channel & ".txt","Register","Allowed","")="" then 'SendCommand "/timer " & Channel & "1 1 1 /msg " & Channel & " " & GetIdentifier("$randphrase(hello.txt)",ServerNumber) & "",ServerNumber End If If not GetIniFile("" & Channel & ".txt",GetIdentifier("$mask($nick(" & Channel & "," & Nickname & ").mask,2)",ServerNumber),"Note","")="" then SendCommand "/timer notice" & Nickname & " 1 2 /notice " & Nickname & " Your note: " & GetIniFile("" & Channel & ".txt",GetIdentifier("$mask($nick(" & Channel & "," & Nickname & ").mask,2)",ServerNumber),"Note","") & "",ServerNumber End If If not Getinifile("Note.txt",GetIdentifier("$mask($nick(" & Channel & "," & Nickname & ").mask,2)",ServerNumber),"Checked","")="1" then Notemem="0" Scount="" Unote="0" Do while not Notemem > 50 Notemem = Notemem -- 1 If not Notemem > 50 then If not Getinifile("Note.txt",GetIdentifier("$mask($nick(" & Channel & "," & Nickname & ").mask,2)",ServerNumber),Notemem,"")="" then If Left(Getinifile("Note.txt",GetIdentifier("$mask($nick(" & Channel & "," & Nickname & ").mask,2)",ServerNumber),Notemem,""),1)="&" then Unote = Unote -- 1 Scount = Scount + ", *" & Notemem & "" End If End If Elseif not Unote="0" then Sendcommand "/timer " & Channel & "N" & Nickname & " 1 2 /notice " & Nickname & " You have " & Unote & " unread message(s) marked with * on " & Mid(Scount,2) & "",ServerNumber Writeinifile"Note.txt",GetIdentifier("$mask($nick(" & Channel & "," & Nickname & ").mask,2)",ServerNumber),"Checked","1" NCRhost = GetIdentifier("$mask($nick(" & Channel & "," & Nickname & ").mask,2)",ServerNumber) Sendcommand "/timer " & Channel & "N1c" & Nickname & " 1 180 /! Mnote " & NCRhost & "",ServerNumber End If Loop End If End Sub Sub ONTEXT(Message,Channel,Nickname,Host,ServerNumber) If Getinifile("Settings.txt","Settings","Tool","")="" then Writeinifile"Settings.txt","Settings","Tool","&" End If Tool = Getinifile("Settings.txt","Settings","Tool","") If not Getinifile("Note.txt",GetIdentifier("$mask($nick(" & Channel & "," & Nickname & ").mask,2)",ServerNumber),"Checked","")="1" then Notemem="0" Scount="" Unote="0" Do while not Notemem > 50 Notemem = Notemem -- 1 If not Notemem > 50 then If not Getinifile("Note.txt",GetIdentifier("$mask($nick(" & Channel & "," & Nickname & ").mask,2)",ServerNumber),Notemem,"")="" then If Left(Getinifile("Note.txt",GetIdentifier("$mask($nick(" & Channel & "," & Nickname & ").mask,2)",ServerNumber),Notemem,""),1)="&" then Unote = Unote -- 1 Scount = Scount + ", *" & Notemem & "" End If End If Elseif not Unote="0" then Ntc Nickname, "You have " & Unote & " unread message(s) marked with * on " & Mid(Scount,2) & "",ServerNumber Writeinifile"Note.txt",GetIdentifier("$mask($nick(" & Channel & "," & Nickname & ").mask,2)",ServerNumber),"Checked","1" NCRhost = GetIdentifier("$mask($nick(" & Channel & "," & Nickname & ").mask,2)",ServerNumber) Sendcommand "/timer " & Channel & "N1c" & Nickname & " 1 180 /! Mnote " & NCRhost & "",ServerNumber End If Loop End If words = split(message," ") Num = "0" Thumb = "" SPcount = Len(Nickname) Do while not Num = SPcount -- 1 Num = Num -- 1 If not Mid(Left(Nickname,Num -- 0),Num -- 0)="|" and Not Mid(Left(Nickname,Num -- 0),Num -- 0)="[" and Not Mid(Left(Nickname,Num -- 0),Num -- 0)="]" and not Mid(Left(Nickname,Num -- 0),Num -- 0)="" then Thumb = Thumb + "" & Mid(Left(Nickname,Num -- 0),Num -- 0) & "" ElseIf Mid(Left(Nickname,Num -- 0),Num -- 0)="" then End If Loop If GetIniFile("Spammers.txt","Count",Thumb,"")="" then Writeinifile"Spammers.txt","Count",Thumb,"0" End If If GetIniFile("" & Channel & ".txt","Spam","Nospam","")="On" then If GetIniFile("" & Channel & ".txt","Spam","Ops","")="Off" and IsOp(Nickname,Channel,ServerNumber) then If GetIniFile("Spammers.txt","Count",Thumb,"")>"1" then Sendcommand "/ignore " & Thumb & "",ServerNumber Sendcommand "/timer " & Thumb & "1 1 30 /ignore " & Thumb & "",ServerNumber Writeinifile"Spammers.txt","Count",Thumb,"" Sendcommand "/timer " & Thumb & " off" Exit Sub Else Writeinifile"Spammers.txt","Count",Thumb,GetIniFile("Spammers.txt","Count",Thumb,"") -- 1 Sendcommand "/timer " & Thumb & " off" Sendcommand "/timer " & Thumb & " 1 2 /! FixNick " & Thumb & "",ServerNumber End If ElseIf GetIniFile("Spammers.txt","Count",Thumb,"") - GetIniFile("" & Channel & ".txt","Spam","Message","")="2" or GetIniFile("Spammers.txt","Count",Thumb,"") - GetIniFile("" & Channel & ".txt","Spam","Message","")="3" then Ntc Nickname, "Please stop sending messages so fast",ServerNumber Writeinifile"Spammers.txt","Count",Thumb,GetIniFile("Spammers.txt","Count",Thumb,"") -- 1 Sendcommand "/timer " & Thumb & " off" Sendcommand "/timer " & Thumb & " 1 " & GetIniFile("" & Channel & ".txt","Spam","Num","") & " /! FixNick " & Thumb & "",ServerNumber ElseIf GetIniFile("Spammers.txt","Count",Thumb,"") - GetIniFile("" & Channel & ".txt","Spam","Message","")>"3" then Writeinifile"Spammers.txt","Count",Thumb,"" Sendcommand "/kick " & Channel & " " & Nickname & " Spamming is against the channel rules",ServerNumber Sendcommand "/timer " & Thumb & " off" Exit Sub Else Writeinifile"Spammers.txt","Count",Thumb,GetIniFile("Spammers.txt","Count",Thumb,"") -- 1 Sendcommand "/timer " & Thumb & " off" Sendcommand "/timer " & Thumb & " 1 " & GetIniFile("" & Channel & ".txt","Spam","Num","") & " /! FixNick " & Thumb & "",ServerNumber End If ElseIf GetIniFile("Spammers.txt","Count",Thumb,"")>"1" and not nickname = "SteelBot" then Sendcommand "/ignore " & Thumb & "",ServerNumber Sendcommand "/timer " & Thumb & "1 1 30 /ignore " & Thumb & "",ServerNumber Writeinifile"Spammers.txt","Count",Thumb,"" Sendcommand "/timer " & Thumb & " off" Else Writeinifile"Spammers.txt","Count",Thumb,GetIniFile("Spammers.txt","Count",Thumb,"") -- 1 Sendcommand "/timer " & Thumb & " off" Sendcommand "/timer " & Thumb & " 1 2 /! FixNick " & Thumb & "",ServerNumber End If If Lcase(Words(0))="&toolreset" then If not GetIniFile("" & channel & ".txt",Getidentifier("$mask(" & Nickname & "!" & Host & ",2)"),"Protect","") ="Yes" or not channel=Getinifile("Settings.txt","Settings","Channel","") then Ntc Nickname, "Error: No permission!",ServerNumber Elseif Getinifile("Settings.txt","Settings","Tool","") = "&" then Ntc Nickname, "Error: You already have this as your current tool!",ServerNumber Else writeinifile"Settings.txt","Settings","Tool","&" Ntc Nickname, "Success: Your new tool is " & Getinifile("Settings.txt","Settings","Tool","") & "",ServerNumber End If End If If Left(Message,1) = Tool Then Select Case Replace(LCase(words(0)),Tool,"") Case "spam" If Not GetIniFile("" & Channel & ".txt",GetIdentifier("$mask($nick(" & Channel & "," & Nickname & ").mask,2)",ServerNumber),"Admin","")="Yes" then Ntc Nickname, "Error: No permission!",ServerNumber ElseIf Mid(Message,7)="" then Ntc Nickname, "Please see help information for this command",ServerNumber ElseIf Lcase(words(1))="count" then If not Words(2)>4 or not Words(2)<10 then Ntc Nickname, "Error: Please set your kick number between 5 and 9 messages",ServerNumber Else WriteIniFile"" & Channel & ".txt","Spam","Message",words(2) - 5 Ntc Nickname, "Users will now be kicked for sending " & Words(2) & " messages in " & GetIniFile("" & Channel & ".txt","Spam","Num","") & " Seconds",ServerNumber End If ElseIf Lcase(words(1))="time" then If Not GetIniFile("" & Channel & ".txt",GetIdentifier("$mask($nick(" & Channel & "," & Nickname & ").mask,2)",ServerNumber),"Admin","")="Yes" then ElseIf not Words(2)>1 or not Words(2)<10 then Ntc Nickname, "Error: Please set your kick time reset between 2 and 6 seconds",ServerNumber Else WriteIniFile"" & Channel & ".txt","Spam","Num",words(2) Ntc Nickname, "Users will now be kicked for sending " & GetIniFile("" & Channel & ".txt","Spam","Message","") -- 5 & " messages in " & words(2) & " seconds",ServerNumber End If ElseIf Lcase(words(1))="info" then If GetIniFile("" & Channel & ".txt","Spam","Nospam","")="On" then If GetIniFile("" & Channel & ".txt","Spam","Ops","")="On" then Ntc Nickname, "Spam detection is enabled: All users will be kicked for sending " & GetIniFile("" & Channel & ".txt","Spam","Message","") -- 5 & " messages in " & GetIniFile("" & Channel & ".txt","Spam","Num","") & " seconds",ServerNumber Else Ntc Nickname, "Spam detection is enabled: Users excluding ops will be kicked for sending " & GetIniFile("" & Channel & ".txt","Spam","Message","") -- 5 & " messages in " & GetIniFile("" & Channel & ".txt","Spam","Num","") & " seconds",ServerNumber End If Else Ntc Nickname, "Spam detection is currently off. You can enable this feature by " & Tool & "Spam Set On",ServerNumber End If ElseIf Lcase(words(1))="set" then If Lcase(words(2))="1" then If GetIniFile("" & Channel & ".txt","Spam","Nospam","")="On" then Ntc Nickname, "Error: Already enabled!",ServerNumber Else WriteIniFile"" & Channel & ".txt","Spam","Nospam","On" Ntc Nickname, "Spam detection now enabled!",ServerNumber End If ElseIf Lcase(words(2))="0" then If GetIniFile("" & Channel & ".txt","Spam","Nospam","")="Off" then Ntc Nickname, "Error: Already disabled!",ServerNumber Else WriteIniFile"" & Channel & ".txt","Spam","Nospam","Off" Ntc Nickname, "Spam detection now disabled!",ServerNumber End If End If ElseIf Lcase(words(1))="opdetect" then If Lcase(words(2))="1" then If GetIniFile("" & Channel & ".txt","Spam","Ops","")="On" then Ntc Nickname, "Error: Already enabled!",ServerNumber Else WriteIniFile"" & Channel & ".txt","Spam","Ops","On" Ntc Nickname, "Spam detection for ops now enabled!",ServerNumber End If ElseIf Lcase(words(2))="0" then If GetIniFile("" & Channel & ".txt","Spam","Ops","")="Off" then Ntc Nickname, "Error: Already disabled!",ServerNumber Else WriteIniFile"" & Channel & ".txt","Spam","Ops","Off" Ntc Nickname, "Spam detection for ops now disabled!",ServerNumber End If End If End If Case "newchan" If channel=Getinifile("Settings.txt","Settings","Channel","") and Lcase(Mid(Message,Len(words(0)) -- 2))="" then If not Getinifile("Settings.txt","Settings","Channel","")="" then Ntc Nickname, "Correct syntax is " & Tool & "Newchan ",ServerNumber End If ElseIf Getinifile("Settings.txt","Settings","Channel","")="" then SendCommand "/msg " & channel & " Sorry, authscript is not set up yet",ServerNumber ElseIf Not Lcase(Mid(Message,Len(words(0)) -- 2))="" and channel=Getinifile("Settings.txt","Settings","Channel","") and GetIniFile("" & channel & ".txt",Getidentifier("$mask(" & Nickname & "!" & Host & ",2)"),"Protect","")="Yes" then If GetIdentifier("$mask($nick(" & channel & "," & words(1) & ").mask,2)",ServerNumber)="$null" then Ntc Nickname, "Please state an active new owner",ServerNumber ElseIf Mid(Message,Len(words(0)) + Len(words(1)) -- 3)="" then Ntc Nickname, "Please state a channel that is real",ServerNumber ElseIf not Getinifile("" & words(2) & ".txt","Register","Allowed","")="" then Ntc Nickname, "Error: Channel is already registered!",ServerNumber Elseif Mid(Message,Len(words(0)) + Len(words(1)) + len(words(2)) -- 4)="" then Ntc Nickname, "Please state the purpose of this channel",ServerNumber Else Sendcommand "/join " & words(2) & "",ServerNumber Sendcommand "/timer newchan" & Nickname & " 1 5 /! Newchan " & words(1) & "|" & Nickname & "|" & words(2) & "|" & ServerNumber & "|" & Mid(Message,Len(words(0)) + Len(words(1)) + len(words(2)) -- 4) & "" End If End If Case "chaninfo" If GetIniFile("" & channel & ".txt","DCC","Allowed","")="0" then dchk="Channel Owner" ElseIf GetIniFile("" & channel & ".txt","DCC","Allowed","")="1" then dchk="Admins" ElseIf GetIniFile("" & channel & ".txt","DCC","Allowed","")="2" then dchk="Moderators" ElseIf GetIniFile("" & channel & ".txt","DCC","Allowed","")="3" then dchk="Registered Users" End If If GetIniFile("" & channel & ".txt","av","av","")="1" then avc="On" Else avc="Off" End If Ntc Nickname, "Allow automatic registration: " & Getinifile("" & Channel & ".txt","Register","Allowed","") & " ; Locked topic: " & Getinifile("" & Channel & ".txt","Topic","Lock","") & " ; Op mode: " & GetIniFile("" & Channel & ".txt","op","Set","") & " ; Autovoice: " & avc & " ; Userlist Availability: " & dchk & " ; PM commands: " & Getinifile("" & Channel & ".txt","Allowpm","Set","") & "",ServerNumber Ntc Nickname, "Default topic: " & Getinifile("" & Channel & ".txt","Topic","Ident","") & " Real topic: " & Getinifile("" & Channel & ".txt","Topic","Topic","") & "",ServerNumber If Getinifile("" & Channel & ".txt","Joinmsg","Msg","")="" then Ntc Nickname, "Greet message: Welcome back (Default) ",ServerNumber ElseIf Getinifile("" & Channel & ".txt","Joinmsg","Msg","")="&" then Ntc Nickname, "Greet message is disabled",ServerNumber Else Ntc Nickname, "Greet Message: " & Getinifile("" & Channel & ".txt","Joinmsg","Msg","") & "",ServerNumber End If Case "botinfo" If GetIniFile("" & channel & ".txt",GetIdentifier("$mask($nick(" & channel & "," & Nickname & ").mask,2)",ServerNumber),"Host","")=GetIdentifier("$mask($nick(" & channel & "," & Nickname & ").mask,2)",ServerNumber) then If Getinifile("Settings.txt","Settings","Users","")="1" then list="In Chat" Else list="Search Only" End If Ntc Nickname, "Main Channel: " & Getinifile("Settings.txt","Settings","Channel","") & " - Registered bot host: " & Getinifile("Settings.txt","Settings","Bhost","") & " - Userlist View Type: " & list & " - Version: " & Ver & "",ServerNumber Else Ntc Nickname, "Error: No Permission",ServerNumber End If Case "tool" If not GetIniFile("" & channel & ".txt",Getidentifier("$mask(" & Nickname & "!" & Host & ",2)"),"Protect","") ="Yes" or not channel=Getinifile("Settings.txt","Settings","Channel","") then Ntc Nickname, "Error: No permission!",ServerNumber ElseIf Mid(Message,7)="" then Ntc Nickname, "Error: Please state a character to use for your new tool",ServerNumber ElseIf not Mid(Message,8)="" then Ntc Nickname, "Error: Please only use a single character tool!",ServerNumber Elseif Getinifile("Settings.txt","Settings","Tool","") = words(1) then Ntc Nickname, "Error: You already have this as your current tool!",ServerNumber Else Writeinifile"Settings.txt","Settings","Tool",Lcase(words(1)) Ntc Nickname, "Success: Your new tool is " & Getinifile("Settings.txt","Settings","Tool","") & "",ServerNumber End If Case "help" If mid(Message,6)="" then If GetIniFile("" & Channel & ".txt",GetIdentifier("$mask($nick(" & Channel & "," & Nickname & ").mask,2)",ServerNumber),"Admin","")="" then Ntc Nickname, "Your commands are: " & Tool & "Register, " & Tool & "Chaninfo, " & Tool & "Help, " & Tool & "Botinfo",ServerNumber ElseIf Left(GetIniFile("" & Channel & ".txt",GetIdentifier("$mask($nick(" & Channel & "," & Nickname & ").mask,2)",ServerNumber),"Host",""),1)="s" then Ntc Nickname, "Your commands are: " & Tool & "Chaninfo, " & Tool & "Help, " & Tool & "Unregister, " & Tool & "Botinfo",ServerNumber ElseIf GetIniFile("" & Channel & ".txt",GetIdentifier("$mask($nick(" & Channel & "," & Nickname & ").mask,2)",ServerNumber),"Mod","")="No" then Ntc Nickname, "Your commands are: " & Tool & "Up, " & Tool & "Down, " & Tool & "Me, " & Tool & "User, " & Tool & "Users, " & Tool & "Setinfo, " & Tool & "Update, " & Tool & "Note, " & Tool & "Chaninfo, " & Tool & "Seen, " & Tool & "Help, " & Tool & "Unregister, " & Tool & "Snuggle, " & Tool & "Message, " & Tool & "Botinfo, " & Tool & "Banlist",ServerNumber ElseIf GetIniFile("" & Channel & ".txt",GetIdentifier("$mask($nick(" & Channel & "," & Nickname & ").mask,2)",ServerNumber),"Mod","")="Yes" and GetIniFile("" & Channel & ".txt",GetIdentifier("$mask($nick(" & Channel & "," & Nickname & ").mask,2)",ServerNumber),"Admin","")="No" then Ntc Nickname, "Your commands are: " & Tool & "Up, " & Tool & "Down, " & Tool & "Voice, " & Tool & "Devoice, " & Tool & "Me, " & Tool & "User, " & Tool & "Users, " & Tool & "Kick, " & Tool & "Ban, " & Tool & "Unban, " & Tool & "Undoban, " & Tool & "Setinfo, " & Tool & "Topic, " & Tool & "Trefresh, " & Tool & "Greet, " & Tool & "Update, " & Tool & "Note, " & Tool & "Chaninfo, " & Tool & "Seen, " & Tool & "Help, " & Tool & "Unregister, " & Tool & "Snuggle, " & Tool & "Fix, " & Tool & "Sync, " & Tool & "Message, " & Tool & "Botinfo, " & Tool & "Banlist, " & Tool & "Invite",ServerNumber ElseIf GetIniFile("" & Channel & ".txt",GetIdentifier("$mask($nick(" & Channel & "," & Nickname & ").mask,2)",ServerNumber),"Admin","")="Yes" then Ntc Nickname, "Your commands are: " & Tool & "Up, " & Tool & "Down, " & Tool & "Voice, " & Tool & "Devoice, " & Tool & "Me, " & Tool & "User, " & Tool & "Users, " & Tool & "Kick, " & Tool & "Ban, " & Tool & "Unban, " & Tool & "Undoban, " & Tool & "Setinfo, " & Tool & "Topic, " & Tool & "Trefresh, " & Tool & "Greet, " & Tool & "Update, " & Tool & "Note, " & Tool & "Chaninfo, " & Tool & "Seen, " & Tool & "Help, " & Tool & "Unregister, " & Tool & "Snuggle, " & Tool & "Fix, " & Tool & "Sync, " & Tool & "Message, " & Tool & "Botinfo, " & Tool & "Banlist, " & Tool & "Invite",ServerNumber Ntc Nickname, "Admin commands: " & Tool & "Deluser, " & Tool & "Op, " & Tool & "Deop, " & Tool & "Moderate, " & Tool & "Demoderate, " & Tool & "Clearinfo, " & Tool & "Infolock, " & Tool & "Suspend, " & Tool & "Unsuspend, " & Tool & "Spam, " & Tool & "Autovoice",ServerNumber If GetIniFile("" & Channel & ".txt",GetIdentifier("$mask($nick(" & Channel & "," & Nickname & ").mask,2)",ServerNumber),"Protect","")="Yes" then If Channel=Getinifile("Settings.txt","Settings","Channel","") then Ntc Nickname, "Special Commands: " & Tool & "Override (Via PM), " & Tool & "Newchan , " & Tool & "Admin, " & Tool & "Deadmin, " & Tool & "Dtopic, " & Tool & "Setop, " & Tool & "Registration, " & Tool & "Addban, " & Tool & "Delban, " & Tool & "Restrict, " & Tool & "Unrestrict, " & Tool & "Move, " & Tool & "Flip, " & Tool & "Tool, " & Tool & "Allowpm, " & Tool & "Userlist, " & Tool & "Checkop",ServerNumber Else Ntc Nickname, "Special Commands: " & Tool & "Admin, " & Tool & "Deadmin, " & Tool & "Dtopic, " & Tool & "Setop, " & Tool & "Registration, " & Tool & "Addban, " & Tool & "Delban, " & Tool & "Restrict, " & Tool & "Unrestrict, " & Tool & "Move, " & Tool & "Flip, " & Tool & "Allowpm, " & Tool & "Userlist, " & Tool & "Checkop",ServerNumber End If End If End If Else Select Case Lcase(words(1)) Case "up" Ntc Nickname, "Use this to gain the highest attainable user mode in a channel based on your user level and channel settings",ServerNumber Case "down" Ntc Nickname, "Use this to remove all channel user modes",ServerNumber Case "register" Ntc Nickname, "Use this to register with the channel and gain basic bot commands",ServerNumber Case "voice" Ntc Nickname, "Use this to give voice to another user. Shortcut " & Tool & "V",ServerNumber Case "devoice" Ntc Nickname, "Use this to devoice another user. Shortcut " & Tool & "DV",ServerNumber Case "me" Ntc Nickname, "Use this to get your own personal account information including your note if you have one",ServerNumber Case "user" Ntc Nickname, "Use this to get another user's account information. You cannot see their note if they have one. Auto search for other users when a specific user is not found",ServerNumber Case "kick" Ntc Nickname, "Use this to kick a user from your channel. Shortcut " & Tool & "K",ServerNumber Case "ban" Ntc Nickname, "Use this to ban an active user from your channel. Shortcut " & Tool & "B",ServerNumber Case "unban" Ntc Nickname, "Use this to unban an active network user from your channel. Shortcut " & Tool & "UB",ServerNumber Case "undoban" Ntc Nickname, "Use this to undo the last set ban on a user in your channel. It only works on the last one. Shortcut " & Tool & "UDB or " & Tool & "Sorry. If a channel owner set an addban, only they will be able to undo it",ServerNumber Case "setinfo" Ntc Nickname, "Use this to set a message to be displayed when you enter a channel. Simply state the command to clear your info",ServerNumber Case "topic" Ntc Nickname, "Use this to change the end part of your channel's topic",ServerNumber Case "trefresh" Ntc Nickname, "Use this to reset the last set topic if it is different than before",ServerNumber Case "greet" Ntc Nickname, "Use this to set a message to display to users who join your channel. Users with setinfo activated do not see your greet message. You can also turn it off via " & Tool & "Greet 0",ServerNumber Case "update" Ntc Nickname, "Use this to change your on file nickname to your current one",ServerNumber Case "note" Ntc Nickname, "Use this to set a reminder or note. It displays each time you join the channel you set it on and from your account info using " & Tool & "Me",ServerNumber Case "chaninfo" Ntc Nickname, "Use this to get basic channel information such as the topic and greet message",ServerNumber Case "seen" Ntc Nickname, "Use this to get the date of when a specific user joined last",ServerNumber Case "help" Ntc Nickname, "A universal command. &Help alone will display all of your available channel commands based on your permissions. Use " & Tool & "Help followed by a regular channel command to get info on what a command does",ServerNumber Case "unregister" Ntc Nickname, "Use this to remove yourself and all permissions from the specified channel user list",ServerNumber Case "snuggle" Ntc Nickname, "A universal command. Use this toy to make the bot snuggle yourself by not declaring a nickname after the command or you can state another user",ServerNumber Case "deluser" Ntc Nickname, "Use this to completely delete a registered user from your channel's user list",ServerNumber Case "op" Ntc Nickname, "A universal command. Use this to op a registered user on your channel. You can also state either 0 or 1 after &op to control whether or not you are opped automatically as a user mode.",ServerNumber Case "deop" Ntc Nickname, "Use this to deop a registered user on your channel",ServerNumber Case "moderate" Ntc Nickname, "Use this to give a registered user moderation control over your channel",ServerNumber Case "demoderate" Ntc Nickname, "Use this to remove moderation (and admin if present) power from a registered user in your channel",ServerNumber Case "clearinfo" Ntc Nickname, "Use this to clear a registered user's channel join message",ServerNumber Case "infolock" Ntc Nickname, "Use this to set the topic and greet editing permissions for moderators. 0 to disable, 1 to enable",ServerNumber Case "suspend" Ntc Nickname, "Use this to basically unregister a user to basic power while being able to reinstate the user at any later time",ServerNumber Case "unsuspend" Ntc Nickname, "Use this to reinstate a user's power to your channel. Moderation and admin power is automatically restored",ServerNumber Case "override" If GetIniFile("" & channel & ".txt",Getidentifier("$mask(" & Nickname & "!" & Host & ",2)"),"Protect","")="Yes" and channel=Getinifile("Settings.txt","Settings","Channel","") then Ntc Nickname, "" & Tool & "Override 1 sets you at admin level for a channel and " & Tool & "Override 2 sets you at ownership level. " & Tool & "Override 3 allows you to recieve auth script files via dcc. Only use this command via pm",ServerNumber Ntc Nickname, "Typing " & Tool & "Override 3 script will send you your last updated auth script. Specify a channel such as " & words(0) & " in place of the word script will send you that txt file",ServerNumber Ntc Nickname, "Having DCC problems? Make sure your firewall lets your client send files through DCC ports and that your DCC send file location is directed at your scripts folder and not your my documents folder",ServerNumber Else Ntc Nickname, "No viewable help information",ServerNumber End If Case "newchan" Ntc Nickname, "Use this to register a new channel with an active new owner via " & Tool & "Newchan ",ServerNumber Case "admin" Ntc Nickname, "Use this to grant admin powers to a registered user on your channel",ServerNumber Case "deadmin" Ntc Nickname, "Use this to remove admin powers from a registered user on your channel",ServerNumber Case "dtopic" Ntc Nickname, "Use this to set the default topic in your channel which is also the first part of the topic",ServerNumber Case "setop" Ntc Nickname, "Use this to set who can claim op status in your channel. 0 = owner only, 1 = admins and up, 2 = mods and up.",ServerNumber Case "registration" Ntc Nickname, "Use this to allow automatic user registration 1 or disable it 0",Servernumber Case "addban" Ntc Nickname, "Use this to ban any hostmask or user name without doing a typical user check",ServerNumber Case "restrict" Ntc Nickname, "Use this to disallow an admin from changing other user permissions",ServerNumber Case "unrestrict" Ntc Nickname, "Use this to allow an admin to change other user permissions",ServerNumber Case "move" Ntc Nickname, "Use this to move a user's account to another account say if their host happened to change. &Move account1 account2",ServerNumber Case "delban" Ntc Nickname, "Use this to remove any hostmask or user name without doing a typical user check",Servernumber Case "userlist" If GetIniFile("" & words(0) & ".txt",Getidentifier("$mask(" & Nickname & "!" & Host & ",2)"),"Protect","")="Yes" and words(0)=Getinifile("Settings.txt","Settings","Channel","") then Ntc Nickname, "You can allow searching or in chat viewable content: " & Tool & "Userlist view 0 or " & Tool & "Userlist view 1",ServerNumber End If Ntc Nickname, "Use this to set who can view your channel user list (0 = Channel Owner, 1 = Admins, 2 = Mods, 3 = Any Registered User)",ServerNumber Case "flip" Ntc Nickname, "Use this to reverse the mode(s) set on a user whether it be op or voice (Case sensitive)",ServerNumber Case "sync" Ntc Nickname, "Use this to set all active channel users to their correct channel modes",ServerNumber Case "fix" Ntc Nickname, "Use this to set a user to their correct channel mode if it has otherwise been changed (Case sensitive)",ServerNumber Case "tool" Ntc Nickname, "Use this to set the character you wish to use to activate your commands. Default tool: &. If you forget your tool, simply type &Toolreset.",ServerNumber Case "allowpm" Ntc Nickname, "Use this to control whether or not users may use bot commands via PM (0 or 1)",ServerNumber Case "spam" Ntc Nickname, "Use this to kick users for spamming in your channel. " & Tool & "Spam Count will set the amount of messages to kick for, " & Tool & "Spam Time will set how many messages may be sent at once",ServerNumber Ntc Nickname, "" & Tool & "Spam Info will give you your current settings. " & Tool & "Spam Opdetect (0 or 1) controls whether I kick ops for spamming. " & Tool & "Spam (0 or 1) controls whether I kick users for spamming",ServerNumber Case "message" Ntc Nickname, "You can " & Tool & "Message Check, " & Tool & "Message Read , " & Tool & "Message Delete , " & Tool & "Message Send , " & Tool & "Message Preview , " & Tool & "Message Block , " & Tool & "Message Unblock ",ServerNumber Case "users" Ntc Nickname, "Use this to view the registered users in a channel",ServerNumber Case "botinfo" Ntc Nickname, "Use this to see bot information",ServerNumber Case "banlist" Ntc Nickname, "Use this to see ban information. If enabled, simply state Banlist to see a list of all channel bans. You can also search through banned hosts by stating " & Tool & "Banlist (Even partial hosts) or the ban number a host rests on",ServerNumber Case "checkop" Ntc Nickname, "Use this to set whether the bot reverses +o when set by a user whom should not be allowed to set the mode. 0 to disable or 1 to enable.",ServerNumber Case "autovoice" Ntc Nickname, "Use this to set whether the bot autovoices users whom are not registered to the bot or suspended users when they join your channel. 0 to disable or 1 to enable.",ServerNumber Case "invite" Ntc Nickname, "Use this to invite a user to your channel.",ServerNumber Case Else Ntc Nickname, "I did not recognize this command. Make sure it is a valid command for authscript",ServerNumber End Select End If Case "register" If not IsVoice(Nickname,Channel,ServerNumber) and not IsOp(Nickname,Channel,ServerNumber) then Ntc Nickname, "You cannot register! Reason: Not voiced as a requirement!",ServerNumber ElseIf GetIniFile("" & Channel & ".txt",GetIdentifier("$mask($nick(" & Channel & "," & Nickname & ").mask,2)",ServerNumber),"Host","")=GetIdentifier("$mask($nick(" & Channel & "," & Nickname & ").mask,2)",ServerNumber) then Ntc Nickname, "You cannot register! Reason: You are already registered",ServerNumber ElseIf Mid(GetIniFile("" & Channel & ".txt",GetIdentifier("$mask($nick(" & Channel & "," & Nickname & ").mask,2)",ServerNumber),"Host",""),3)=GetIdentifier("$mask($nick(" & Channel & "," & Nickname & ").mask,2)",ServerNumber) then Ntc Nickname, "You cannot register! Reason: You are using a suspended account",ServerNumber ElseIf not GetIniFile("" & Channel & ".txt",Nickname,"Host","") = "" then Ntc Nickname, "This nickname is already in use!",ServerNumber ElseIf GetIniFile("" & Channel & ".txt","Register","Allowed","")="Yes" then WriteIniFile"" & Channel & ".txt",GetIdentifier("$mask($nick(" & Channel & "," & Nickname & ").mask,2)",ServerNumber),"Nick", Nickname WriteIniFile"" & Channel & ".txt",GetIdentifier("$mask($nick(" & Channel & "," & Nickname & ").mask,2)",ServerNumber),"Host", GetIdentifier("$mask($nick(" & Channel & "," & Nickname & ").mask,2)",ServerNumber) WriteIniFile"" & Channel & ".txt",GetIdentifier("$mask($nick(" & Channel & "," & Nickname & ").mask,2)",ServerNumber),"Mod","No" WriteIniFile"" & Channel & ".txt",GetIdentifier("$mask($nick(" & Channel & "," & Nickname & ").mask,2)",ServerNumber),"Admin","No" WriteIniFile"" & Channel & ".txt",GetIdentifier("$mask($nick(" & Channel & "," & Nickname & ").mask,2)",ServerNumber),"Protect","No" WriteIniFile"" & Channel & ".txt",GetIdentifier("$mask($nick(" & Channel & "," & Nickname & ").mask,2)",ServerNumber),"Seen",Date WriteIniFile"" & Channel & ".txt",GetIniFile("" & Channel & ".txt",GetIdentifier("$mask($nick(" & Channel & "," & Nickname & ").mask,2)",ServerNumber),"Nick",""),"Host",GetIdentifier("$mask($nick(" & Channel & "," & Nickname & ").mask,2)",ServerNumber) Ntc Nickname, "You are now registered as " & Nickname & " $mask($nick(" & Channel & "," & Nickname & ").mask,2) ",ServerNumber Ntc Nickname, "Your command access list can be found using " & Tool & "Help. Get info about a command via " & Tool & "Help ",ServerNumber Else Ntc Nickname, "You cannot register! Reason: Automatic registration disabled",ServerNumber End If Case "allowpm" If not GetIniFile("" & channel & ".txt",GetIdentifier("$mask($nick(" & Channel & "," & Nickname & ").mask,2)",ServerNumber),"Protect","")="Yes" then Ntc Nickname, "Error: Not a channel owner",ServerNumber Elseif Mid(Message,10) = "" then Ntc Nickname, "Please see help information for this command",ServerNumber ElseIf Lcase(words(1))="0" then If GetIniFile("" & Channel & ".txt","Allowpm","Set","")="No" then Ntc Nickname, "Error: PM commands have already been disabled!",ServerNumber Else writeIniFile"" & Channel & ".txt","Allowpm","Set","No" Ntc Nickname, "PM commands are now disabled!",ServerNumber End If ElseIf Lcase(words(1))="1" then If GetIniFile("" & Channel & ".txt","Allowpm","Set","")="Yes" then Ntc Nickname, "Error: PM commands have already been enabled!",ServerNumber Else writeIniFile"" & Channel & ".txt","Allowpm","Set","Yes" Ntc Nickname, "PM commands are now enabled!",ServerNumber End If End If Case "unregister" If GetIniFile("" & Channel & ".txt",GetIdentifier("$mask($nick(" & Channel & "," & Nickname & ").mask,2)",ServerNumber),"Host","")=GetIdentifier("$mask($nick(" & Channel & "," & Nickname & ").mask,2)",ServerNumber) or Left(GetIniFile("" & Channel & ".txt",GetIdentifier("$mask($nick(" & Channel & "," & Nickname & ").mask,2)",ServerNumber),"Host",""),1)="s" then If GetIniFile("" & Channel & ".txt",GetIdentifier("$mask($nick(" & Channel & "," & Nickname & ").mask,2)",ServerNumber),"Protect","")="Yes" and not GetIniFile("" & Channel & ".txt",GetIdentifier("$mask($nick(" & Channel & "," & Nickname & ").mask,2)",ServerNumber),"Special","")="Yes" then Ntc Nickname, "Error: Channel owners cannot remove themselves!",ServerNumber Else WriteIniFile"" & Channel & ".txt",GetIniFile("" & Channel & ".txt",GetIdentifier("$mask($nick(" & Channel & "," & Nickname & ").mask,2)",ServerNumber),"Nick",""),"Host","" WriteIniFile"" & Channel & ".txt",GetIdentifier("$mask($nick(" & Channel & "," & Nickname & ").mask,2)",ServerNumber),"Nick", "Unregistered on " & Date & "" WriteIniFile"" & Channel & ".txt",GetIdentifier("$mask($nick(" & Channel & "," & Nickname & ").mask,2)",ServerNumber),"Host", "Unregistered by " & Host & "" WriteIniFile"" & Channel & ".txt",GetIdentifier("$mask($nick(" & Channel & "," & Nickname & ").mask,2)",ServerNumber),"Mod","" WriteIniFile"" & Channel & ".txt",GetIdentifier("$mask($nick(" & Channel & "," & Nickname & ").mask,2)",ServerNumber),"Admin","" WriteIniFile"" & Channel & ".txt",GetIdentifier("$mask($nick(" & Channel & "," & Nickname & ").mask,2)",ServerNumber),"Protect","" WriteIniFile"" & Channel & ".txt",GetIdentifier("$mask($nick(" & Channel & "," & Nickname & ").mask,2)",ServerNumber),"Join","" WriteIniFile"" & Channel & ".txt",GetIdentifier("$mask($nick(" & Channel & "," & Nickname & ").mask,2)",ServerNumber),"Note","" WriteIniFile"" & Channel & ".txt",GetIdentifier("$mask($nick(" & Channel & "," & Nickname & ").mask,2)",ServerNumber),"Seen","" writeinifile"" & Channel & ".txt",GetIdentifier("$mask($nick(" & Channel & "," & Nickname & ").mask,2)",ServerNumber),"Op","" WriteIniFile"" & Channel & ".txt",GetIdentifier("$mask($nick(" & Channel & "," & Nickname & ").mask,2)",ServerNumber),"Special","" if GetIniFile("" & Words(0) & ".txt","av","av","")="1" then SendCommand "/mode " & Channel & " -o+v " & Nickname & " " & Nickname & "" else SendCommand "/mode " & Channel & " -ov " & Nickname & " " & Nickname & "" end if SendCommand "/msg " & Channel & " You are now unregistered as " & GetIdentifier("$mask($nick(" & Channel & "," & Nickname & ").mask,2)",ServerNumber) & "",ServerNumber End If Else Ntc Nickname, "You cannot Unregister! Reason: Not registered!",ServerNumber End If Case "userlist" If Mid(Message,11)="" then Ntc Nickname, "Please view help information for this command",ServerNumber Elseif getIniFile("" & channel & ".txt",Getidentifier("$mask(" & Nickname & "!" & Host & ",2)"),"Protect","")="Yes" then If Lcase(words(1))="view" then If Channel = Getinifile("Settings.txt","Settings","Channel","") then If Lcase(Mid(Message,16))="0" then If Getinifile("Settings.txt","Settings","Users","")="0" then Ntc Nickname, "Error: Already set to DCC",ServerNumber Else Writeinifile"Settings.txt","Settings","Users","0" Ntc Nickname, "User and ban list is now set to be viewed by DCC download",ServerNumber End If ElseIf Lcase(Mid(Message,16))="1" then If Getinifile("Settings.txt","Settings","Users","")="1" then Ntc Nickname, "Error: Already set to Chat",ServerNumber Else Writeinifile"Settings.txt","Settings","Users","1" Ntc Nickname, "User and ban list is now set to be viewed in chat",ServerNumber End If End If End If Elseif Mid(Message,11)="0" then If not GetIniFile("" & channel & ".txt","DCC","Allowed","")="0" then writeIniFile"" & channel & ".txt","DCC","Allowed","0" Ntc Nickname, "Only channel owner may now get the user list",ServerNumber Else Ntc Nickname, "Error: Already set!",ServerNumber End If ElseIf Mid(Message,11)="1" then If not GetIniFile("" & channel & ".txt","DCC","Allowed","")="1" then writeIniFile"" & channel & ".txt","DCC","Allowed","1" Ntc Nickname, "Channel admins and up may now get the user list",ServerNumber Else Ntc Nickname, "Error: already set!",ServerNumber End If ElseIf Mid(Message,11)="2" then If not GetIniFile("" & channel & ".txt","DCC","Allowed","")="2" then writeIniFile"" & channel & ".txt","DCC","Allowed","2" Ntc Nickname, "Channel moderators and up may now get the user list",ServerNumber Else Ntc Nickname, "Error: already set!",ServerNumber End If ElseIf Mid(Message,11)="3" then If not GetIniFile("" & channel & ".txt","DCC","Allowed","")="3" then writeIniFile"" & channel & ".txt","DCC","Allowed","3" Ntc Nickname, "Channel users and up may now get the user list",ServerNumber Else Ntc Nickname, "Error: already set!",ServerNumber End If End If Else Ntc Nickname, "Error: Not a channel owner!",ServerNumber End If Case "users" If not GetIniFile("" & channel & ".txt",Getidentifier("$mask(" & Nickname & "!" & Host & ",2)"),"Host","") = "" and GetIniFile("" & channel & ".txt","DCC","Allowed","")>"2" then Sendcommand "/! Ulist " & Nickname & "|" & Channel & "|" & ServerNumber & "" ElseIf GetIniFile("" & channel & ".txt",Getidentifier("$mask(" & Nickname & "!" & Host & ",2)"),"Mod","") = "Yes" and GetIniFile("" & channel & ".txt","DCC","Allowed","")>"1" then Sendcommand "/! Ulist " & Nickname & "|" & Channel & "|" & ServerNumber & "" ElseIf GetIniFile("" & channel & ".txt",Getidentifier("$mask(" & Nickname & "!" & Host & ",2)"),"Admin","") = "Yes" and GetIniFile("" & channel & ".txt","DCC","Allowed","")>"0" then Sendcommand "/! Ulist " & Nickname & "|" & Channel & "|" & ServerNumber & "" Elseif GetIniFile("" & channel & ".txt",Getidentifier("$mask(" & Nickname & "!" & Host & ",2)"),"Protect","") = "Yes" then Sendcommand "/! Ulist " & Nickname & "|" & Channel & "|" & ServerNumber & "" Else Ntc Nickname, "Error: No permission! - " & GetIniFile("" & channel & ".txt","DCC","Allowed","") & "",ServerNumber End If Case "autovoice" If GetIniFile("" & Channel & ".txt",GetIdentifier("$mask($nick(" & Channel & "," & Nickname & ").mask,2)",ServerNumber),"Admin","") ="Yes" then If Mid(Message,12) = "" then Ntc Nickname, "Please choose 0 to disable or 1 to enable",ServerNumber ElseIf Mid(Message,12) = "1" then If GetIniFile("" & Channel & ".txt","av","av","")="1" then Ntc Nickname, "Error: Autovoicing is already enabled",ServerNumber Else WriteIniFile"" & Channel & ".txt","av","av","1" Ntc Nickname, "Autovoice is now enabled",ServerNumber End If ElseIf Mid(Message,12) = "0" then If GetIniFile("" & Channel & ".txt","av","av","")="0" then Ntc Nickname, "Error: Autovoicing is already disabled",ServerNumber Else WriteIniFile"" & Channel & ".txt","av","av","0" Ntc Nickname, "Autovoice is now disabled",ServerNumber End If End If Else Ntc Nickname, "Error: Not a channel admin",ServerNumber End If Case "invite" If GetIniFile("" & channel & ".txt",Getidentifier("$mask(" & Nickname & "!" & Host & ",2)"),"Mod","") ="Yes" then If Mid(Message,(9))="" then Ntc Nickname, "Please state a nickname to invite",ServerNumber Elseif not GetIdentifier("$mask($nick(" & channel & "," & Mid(Message,(9)) & ").mask,2)",ServerNumber)="$null" then Ntc Nickname, "Error: " & Mid(Message,(9)) & " is already in the channel",ServerNumber Else SendCommand "/invite " & Mid(Message,(9)) & " " & channel & "",ServerNumber End If Else Ntc Nickname, "Error: Not a channel moderator",ServerNumber End If Case "up" If IsOp(Nickname,Channel,ServerNumber) then Ntc Nickname, "Error: You are up",ServerNumber ElseIf not GetIniFile("" & Channel & ".txt",GetIdentifier("$mask($nick(" & Channel & "," & Nickname & ").mask,2)",ServerNumber),"Host","")=GetIdentifier("$mask($nick(" & Channel & "," & Nickname & ").mask,2)",ServerNumber) then Ntc Nickname, "Cannot up! Reason: Not registered",ServerNumber ElseIf GetIniFile("" & Channel & ".txt",GetIdentifier("$mask($nick(" & Channel & "," & Nickname & ").mask,2)",ServerNumber),"Admin","")="Yes" then If not GetIniFile("" & Channel & ".txt","op","Set","")="0" or GetIniFile("" & Channel & ".txt",GetIdentifier("$mask($nick(" & Channel & "," & Nickname & ").mask,2)",ServerNumber),"Protect","")="Yes" then SendCommand "/mode " & Channel & " +o " & Nickname & "",ServerNumber Elseif not IsVoice(Nickname,Channel,ServerNumber) then SendCommand "/mode " & Channel & " +v " & Nickname & "",ServerNumber Else Ntc Nickname, "Error: You are up!",ServerNumber End If ElseIf GetIniFile("" & Channel & ".txt",GetIdentifier("$mask($nick(" & Channel & "," & Nickname & ").mask,2)",ServerNumber),"Mod","")="Yes" then If GetIniFile("" & Channel & ".txt","op","Set","")="2" then SendCommand "/mode " & Channel & " +o " & Nickname & "",ServerNumber Elseif not IsVoice(Nickname,Channel,ServerNumber) then SendCommand "/mode " & Channel & " +v " & Nickname & "",ServerNumber Else Ntc Nickname, "Error: You are up!",ServerNumber End If ElseIf GetIniFile("" & Channel & ".txt",GetIdentifier("$mask($nick(" & Channel & "," & Nickname & ").mask,2)",ServerNumber),"Host","")=GetIdentifier("$mask($nick(" & Channel & "," & Nickname & ").mask,2)",ServerNumber) then If IsVoice(Nickname,Channel,ServerNumber) then Ntc Nickname, "Error: You are up!",ServerNumber Else SendCommand "/mode " & Channel & " +v " & Nickname & "",ServerNumber End If End If Case "down" If GetIniFile("" & Channel & ".txt",GetIdentifier("$mask($nick(" & Channel & "," & Nickname & ").mask,2)",ServerNumber),"Host","")=GetIdentifier("$mask($nick(" & Channel & "," & Nickname & ").mask,2)",ServerNumber) and not IsVoice(Nickname,Channel,ServerNumber) and not IsOp(Nickname,Channel,ServerNumber) then Ntc Nickname, "Cannot down! Reason: You are not voiced or opped!",ServerNumber Else SendCommand "/mode " & Channel & " -ov " & Nickname & " " & Nickname & " ",ServerNumber End If Case "flip" If not GetIniFile("" & Channel & ".txt",GetIdentifier("$mask($nick(" & Channel & "," & Nickname & ").mask,2)",ServerNumber),"Protect","")="Yes" then Ntc Nickname, "Cannot flip! Reason: Not a channel owner",ServerNumber ElseIf Mid(Message,6)="" then Ntc Nickname, "Error: Please state an active user",ServerNumber ElseIf Words(1)=GetIdentifier("$Me",ServerNumber) then Ntc Nickname, "Error: Error: No permission",ServerNumber ElseIf not GetIniFile("" & Channel & ".txt",GetIdentifier("$mask($nick(" & Channel & "," & Words(1) & ").mask,2)",ServerNumber),"Host","")=GetIdentifier("$mask($nick(" & Channel & "," & Words(1) & ").mask,2)",ServerNumber) then Ntc Nickname, "Error: " & Words(1) & " is not a registered user!",ServerNumber ElseIf IsOp(Words(1),Channel,ServerNumber) or IsVoice(Words(1),channel,servernumber) then SendCommand "/mode " & Channel & " -ov " & Words(1) & " " & Words(1) & " ",ServerNumber ElseIf GetIniFile("" & Channel & ".txt",GetIdentifier("$mask($nick(" & Channel & "," & Words(1) & ").mask,2)",ServerNumber),"Admin","")="Yes" then If not GetIniFile("" & Channel & ".txt","op","Set","")="0" or GetIniFile("" & Channel & ".txt",GetIdentifier("$mask($nick(" & Channel & "," & Words(1) & ").mask,2)",ServerNumber),"Protect","")="Yes" then SendCommand "/mode " & Channel & " +o " & Words(1) & "",ServerNumber Elseif not IsVoice(Words(1),Channel,ServerNumber) then SendCommand "/mode " & Channel & " +v " & Words(1) & "",ServerNumber End If ElseIf GetIniFile("" & Channel & ".txt",GetIdentifier("$mask($nick(" & Channel & "," & Words(1) & ").mask,2)",ServerNumber),"Mod","")="Yes" then If GetIniFile("" & Channel & ".txt","op","Set","")="2" then SendCommand "/mode " & Channel & " +o " & Words(1) & "",ServerNumber Elseif not IsVoice(Words(1),Channel,ServerNumber) then SendCommand "/mode " & Channel & " +v " & Words(1) & "",ServerNumber End If Else SendCommand "/mode " & Channel & " +v " & Words(1) & "",ServerNumber End If Case "fix" If not GetIniFile("" & Channel & ".txt",GetIdentifier("$mask($nick(" & Channel & "," & Nickname & ").mask,2)",ServerNumber),"Mod","")="Yes" then Ntc Nickname, "Cannot fix! Reason: Not a channel moderator", ServerNumber ElseIf Mid(Message,6)="" or GetIdentifier("$mask($nick(" & Channel & "," & Mid(Message,6) & ").mask,2)",ServerNumber) = "$null" then Ntc Nickname, "Error: Please state an active user", ServerNumber ElseIf not GetIniFile("" & Channel & ".txt",GetIdentifier("$mask($nick(" & Channel & "," & Mid(Message,6) & ").mask,2)",ServerNumber),"Host","")=GetIdentifier("$mask($nick(" & Channel & "," & Mid(Message,6) & ").mask,2)",ServerNumber) then If IsOp(Words(1),channel,ServerNumber) then SendCommand "/mode " & channel & " -o " & words(1) & "",ServerNumber If GetIniFile("" & channel & ".txt","av","av","")="1" and not isvoice(Words(1),channel,ServerNumber) then SendCommand "/mode " & channel & " +v " & words(1) & "",ServerNumber End If Elseif GetIniFile("" & channel & ".txt","av","av","")="1" and not isvoice(Words(1),channel,ServerNumber) then SendCommand "/mode " & channel & " +v " & words(1) & "",ServerNumber Elseif isvoice(Words(1),channel,ServerNumber) and not GetIniFile("" & channel & ".txt","av","av","")="1" then SendCommand "/mode " & channel & " -v " & words(1) & "",ServerNumber Else Ntc Nickname, "Error: This user is at their appropriate user settings!",ServerNumber End if ElseIf GetIniFile("" & Channel & ".txt",GetIdentifier("$mask($nick(" & Channel & "," & Words(1) & ").mask,2)",ServerNumber),"Admin","")="Yes" then If not GetIniFile("" & Channel & ".txt","op","Set","")="0" or GetIniFile("" & Channel & ".txt",GetIdentifier("$mask($nick(" & Channel & "," & Words(1) & ").mask,2)",ServerNumber),"Protect","")="Yes" then If Not IsOp(Words(1),Channel,ServerNumber) then SendCommand "/mode " & Channel & " +o " & Words(1) & "",ServerNumber Else Ntc Nickname, "Error: This user is at their appropriate user settings!", ServerNumber End If ElseIf IsOp(Words(1),Channel,ServerNumber) and GetIniFile("" & Channel & ".txt","op","Set","")="0" and not GetIniFile("" & Channel & ".txt",GetIdentifier("$mask($nick(" & Channel & "," & Words(1) & ").mask,2)",ServerNumber),"Protect","")="Yes" then SendCommand "/mode " & Channel & " -o+v " & Words(1) & " " & Words(1) & "",ServerNumber Elseif not IsVoice(Words(1),Channel,ServerNumber) then SendCommand "/mode " & Channel & " +v " & Words(1) & "",ServerNumber Else Ntc Nickname, "Error: This user is at their appropriate user settings!",ServerNumber End If ElseIf GetIniFile("" & Channel & ".txt",GetIdentifier("$mask($nick(" & Channel & "," & Words(1) & ").mask,2)",ServerNumber),"Mod","")="Yes" then If GetIniFile("" & Channel & ".txt","op","Set","")="2" and not IsOp (Words(1),Channel,ServerNumber) then SendCommand "/mode " & Channel & " +o " & Words(1) & "",ServerNumber ElseIf IsOp(Words(1),Channel,ServerNumber) and not GetIniFile("" & Channel & ".txt","op","Set","")="2" then SendCommand "/mode " & Channel & " -o+v " & Words(1) & " " & Words(1) & "",ServerNumber Elseif not IsVoice(Words(1),Channel,ServerNumber) then SendCommand "/mode " & Channel & " +v " & Words(1) & "",ServerNumber Else Ntc Nickname, "Error: This user is at their appropriate user settings!",ServerNumber End If ElseIf IsOp(Words(1),Channel,ServerNumber) then SendCommand "/mode " & Channel & " -o+v " & Words(1) & " " & Words(1) & "",ServerNumber ElseIf not IsVoice(Words(1),Channel,ServerNumber) then SendCommand "/mode " & Channel & " +v " & Words(1) & "",ServerNumber Else Ntc Nickname, "Error: This user is at their appropriate user settings!",ServerNumber End If Case "setinfo" If GetIniFile("" & Channel & ".txt",GetIdentifier("$mask($nick(" & Channel & "," & Nickname & ").mask,2)",ServerNumber),"Host","")=GetIdentifier("$mask($nick(" & Channel & "," & Nickname & ").mask,2)",ServerNumber) then If Mid(Message,10)="" and not GetIniFile("" & Channel & ".txt",GetIdentifier("$mask($nick(" & Channel & "," & Nickname & ").mask,2)",ServerNumber),"Join","")="" then Ntc Nickname, "Your info has been cleared!",ServerNumber WriteIniFile"" & Channel & ".txt",GetIdentifier("$mask($nick(" & Channel & "," & Nickname & ").mask,2)",ServerNumber),"Join","" ElseIf Lcase(Mid(Message,10))="" and GetIniFile("" & Channel & ".txt",GetIdentifier("$mask($nick(" & Channel & "," & Nickname & ").mask,2)",ServerNumber),"Join","")="" then Ntc Nickname, "Error: Nothing to clear!",ServerNumber ElseIf Lcase(Left(Message,10))="&setinfo &" then Ntc Nickname, "Error: Your info message cannot begin with the & symbol",ServerNumber Else WriteIniFile"" & Channel & ".txt",GetIdentifier("$mask($nick(" & Channel & "," & Nickname & ").mask,2)",ServerNumber),"Join",Mid(Message,10) If Lcase(Mid(Message,10))="0" then Ntc Nickname, "I will no longer greet you on channel join", ServerNumber Else Ntc Nickname, Mid(Message,10), ServerNumber End If End If Else Ntc Nickname, "Error: No Permission",ServerNumber End If Case "topic" If GetIniFile("" & Channel & ".txt",GetIdentifier("$mask($nick(" & Channel & "," & Nickname & ").mask,2)",ServerNumber),"Host","")=GetIdentifier("$mask($nick(" & Channel & "," & Nickname & ").mask,2)",ServerNumber) then If getIniFile("" & Channel & ".txt",GetIdentifier("$mask($nick(" & Channel & "," & Nickname & ").mask,2)",ServerNumber),"Mod","")="Yes" then If GetIniFile("" & Channel & ".txt","Topic","Lock","")="On" and not getIniFile("" & Channel & ".txt",GetIdentifier("$mask($nick(" & Channel & "," & Nickname & ").mask,2)",ServerNumber),"Admin","")="Yes" then Ntc Nickname, "Cannot change topic! Reason: Locked by an admin", ServerNumber Else SendCommand "/topic " & Channel & " " & GetIniFile("" & Channel & ".txt","Topic","Ident","") & " " & Mid(Message,8) & "",ServerNumber Writeinifile"" & Channel & ".txt","Topic","Topic",Mid(Message,8) End If Else Ntc Nickname, "Error: Not a channel moderator!",ServerNumber End If Else Ntc Nickname, "Error: No Permission", ServerNumber End If Case "seen" If GetIniFile("" & Channel & ".txt",GetIdentifier("$mask($nick(" & Channel & "," & Nickname & ").mask,2)",ServerNumber),"Host","")=GetIdentifier("$mask($nick(" & Channel & "," & Nickname & ").mask,2)",ServerNumber) then If Mid(Message,7)="" then Ntc Nickname, "Error: Please state a user to get last seen info",ServerNumber ElseIf GetIniFile("" & Channel & ".txt",GetIdentifier("$mask($nick(" & Channel & "," & words(1) & ").mask,2)",ServerNumber),"Nick","")="" and GetIniFile("" & Channel & ".txt",words(1),"Host","")="" then Ntc Nickname, "Error: This user does not exist!",ServerNumber ElseIf not GetIdentifier("$mask($nick(" & Channel & "," & words(1) & ").mask,2)",ServerNumber)="$null" then Ntc Nickname, "" & Words(1) & " is active on the channel",ServerNumber ElseIf getIniFile("" & Channel & ".txt",GetIniFile("" & Channel & ".txt",words(1),"Host",""),"Seen","")="" then Ntc Nickname, "Error: This user has insufficient data. Please try again later",ServerNumber Else Ntc Nickname, "" & Words(1) & " last seen " & getIniFile("" & Channel & ".txt",GetIniFile("" & Channel & ".txt",words(1),"Host",""),"Seen","") & "",ServerNumber End If Else Ntc Nickname, "Error: No Permission",ServerNumber End If Case "registration" If Not GetIniFile("" & Channel & ".txt",GetIdentifier("$mask($nick(" & Channel & "," & Nickname & ").mask,2)",ServerNumber),"Host","")=GetIdentifier("$mask($nick(" & Channel & "," & Nickname & ").mask,2)",ServerNumber) then Ntc Nickname, "Error: No Permission",ServerNumber ElseIf Mid(Message,15)="" then Ntc Nickname, "Please see help information for this command",ServerNumber ElseIf Not getIniFile("" & Channel & ".txt",GetIdentifier("$mask($nick(" & Channel & "," & Nickname & ").mask,2)",ServerNumber),"Protect","")="Yes" then Ntc Nickname, "Error: Not a channel owner!",ServerNumber ElseIf Lcase(Mid(Message,15))="1" then If GetIniFile("" & Channel & ".txt","Register","Allowed","")="Yes" then Ntc Nickname, "Error: Automatic registration is already enabled",ServerNumber Else writeIniFile"" & Channel & ".txt","Register","Allowed","Yes" Ntc Nickname, "Automatic registration is now on",ServerNumber End if ElseIf Lcase(Mid(Message,15))="0" then If GetIniFile("" & Channel & ".txt","Register","Allowed","")="No" then Ntc Nickname, "Error: Automatic registration is already disabled",ServerNumber Else writeIniFile"" & Channel & ".txt","Register","Allowed","No" Ntc Nickname, "Automatic registration is now off",ServerNumber End if End If Case "trefresh" If GetIniFile("" & Channel & ".txt",GetIdentifier("$mask($nick(" & Channel & "," & Nickname & ").mask,2)",ServerNumber),"Host","")=GetIdentifier("$mask($nick(" & Channel & "," & Nickname & ").mask,2)",ServerNumber) then If getIniFile("" & Channel & ".txt",GetIdentifier("$mask($nick(" & Channel & "," & Nickname & ").mask,2)",ServerNumber),"Mod","")="Yes" then SendCommand "/topic " & Channel & " " & GetIniFile("" & Channel & ".txt","Topic","Ident","") & " " & GetIniFile("" & Channel & ".txt","Topic","Topic","") & "",ServerNumber Else Ntc Nickname, "Error: Not a channel moderator!",ServerNumber End If Else Ntc Nickname, "Error: No Permission",ServerNumber End If Case "me" If Left(GetIniFile("" & Channel & ".txt",GetIdentifier("$mask($nick(" & Channel & "," & Nickname & ").mask,2)",ServerNumber),"Host",""),1)="s" then Ntc Nickname, "Your account is currently suspended!",ServerNumber ElseIf GetIniFile("" & Channel & ".txt",GetIdentifier("$mask($nick(" & Channel & "," & Nickname & ").mask,2)",ServerNumber),"Host","")=GetIdentifier("$mask($nick(" & Channel & "," & Nickname & ").mask,2)",ServerNumber) then If Not GetIniFile("" & Channel & ".txt",GetIdentifier("$mask($nick(" & Channel & "," & Nickname & ").mask,2)",ServerNumber),"Join","")="" and Not Left(GetIniFile("" & Channel & ".txt",GetIdentifier("$mask($nick(" & Channel & "," & Nickname & ").mask,2)",ServerNumber),"Join",""),1)="&" then Ntc Nickname, "Join Message: " & GetIniFile("" & Channel & ".txt",GetIdentifier("$mask($nick(" & Channel & "," & Nickname & ").mask,2)",ServerNumber),"Join","") & "",ServerNumber End If If not GetIniFile("" & Channel & ".txt",GetIdentifier("$mask($nick(" & Channel & "," & Nickname & ").mask,2)",ServerNumber),"Note","")="" then Ntc Nickname, "Your note: " & GetIniFile("" & Channel & ".txt",GetIdentifier("$mask($nick(" & Channel & "," & Nickname & ").mask,2)",ServerNumber),"Note","") & "",ServerNumber End If If getinifile("" & Channel & ".txt",GetIdentifier("$mask($nick(" & Channel & "," & Nickname & ").mask,2)",ServerNumber),"Op","")="Off" then Ntc Nickname, "Automatic channel op on join is disabled",ServerNumber End If If GetIniFile("" & channel & ".txt",Getidentifier("$mask(" & Nickname & "!" & Host & ",2)"),"Special","")="S" then Spad="-R-" End If Ntc Nickname, "" & GetIniFile("" & Channel & ".txt",GetIdentifier("$mask($nick(" & Channel & "," & Nickname & ").mask,2)",ServerNumber),"Nick","") & ": Is a mod= " & getIniFile("" & Channel & ".txt",GetIdentifier("$mask($nick(" & Channel & "," & Nickname & ").mask,2)",ServerNumber),"Mod","") & " ; Has admin= " & Spad & "" & GetIniFile("" & Channel & ".txt",GetIdentifier("$mask($nick(" & Channel & "," & Nickname & ").mask,2)",ServerNumber),"Admin","") & " ; Is Protected= " & GetIniFile("" & Channel & ".txt",GetIdentifier("$mask($nick(" & Channel & "," & Nickname & ").mask,2)",ServerNumber),"Protect","") & " ; Host= " & GetIniFile("" & Channel & ".txt",GetIdentifier("$mask($nick(" & Channel & "," & Nickname & ").mask,2)",ServerNumber),"Host","") & "",ServerNumber Else Ntc Nickname, "Error: No Permission",ServerNumber End if Case "note" If GetIniFile("" & Channel & ".txt",GetIdentifier("$mask($nick(" & Channel & "," & Nickname & ").mask,2)",ServerNumber),"Host","")=GetIdentifier("$mask($nick(" & Channel & "," & Nickname & ").mask,2)",ServerNumber) then If Mid(Message,7)="" and not GetIniFile("" & Channel & ".txt",GetIdentifier("$mask($nick(" & Channel & "," & Nickname & ").mask,2)",ServerNumber),"Note","")="" then Ntc Nickname, "You cleared: " & GetIniFile("" & Channel & ".txt",GetIdentifier("$mask($nick(" & Channel & "," & Nickname & ").mask,2)",ServerNumber),"Note","") & "",ServerNumber WriteIniFile"" & Channel & ".txt",GetIdentifier("$mask($nick(" & Channel & "," & Nickname & ").mask,2)",ServerNumber),"Note","" ElseIf Lcase(Mid(Message,7))="" and GetIniFile("" & Channel & ".txt",GetIdentifier("$mask($nick(" & Channel & "," & Nickname & ").mask,2)",ServerNumber),"Note","")="" then Ntc Nickname, "Error: Nothing to clear!",ServerNumber Else WriteIniFile"" & Channel & ".txt",GetIdentifier("$mask($nick(" & Channel & "," & Nickname & ").mask,2)",ServerNumber),"Note",Mid(Message,7) Ntc Nickname, "Note: " & Mid(Message,7) & "",ServerNumber End If Else Ntc Nickname, "Error: No Permission",ServerNumber End If Case "message", "msg" If Getinifile("" & Channel & ".txt",GetIdentifier("$mask($nick(" & Channel & "," & Nickname & ").mask,2)",ServerNumber),"Host","")="" then Ntc Nickname, "Error: No Permission",ServerNumber ElseIf Mid(Message,len(Words(0)) -- 2)="" then Ntc Nickname, "You can " & Tool & "Message Check, " & Tool & "Message Read , " & Tool & "Message Delete , " & Tool & "Message Send , " & Tool & "Message Preview , " & Tool & "Message Block , " & Tool & "Message Unblock ",ServerNumber Else Select Case Lcase(Words(1)) Case "check", "c" Notemem="0" Snote="0" Scount="" Unote="0" Do while not Notemem > 50 Notemem = Notemem -- 1 If not Notemem > 50 then If not Getinifile("Note.txt",GetIdentifier("$mask($nick(" & Channel & "," & Nickname & ").mask,2)",ServerNumber),Notemem,"")="" then If Left(Getinifile("Note.txt",GetIdentifier("$mask($nick(" & Channel & "," & Nickname & ").mask,2)",ServerNumber),Notemem,""),1)="&" then Snote = Snote -- 1 Unote = Unote -- 1 Scount = Scount + ", *" & Notemem & "" Else Snote = Snote -- 1 Scount = Scount + ", " & Notemem & "" End If End If ElseIf Snote = "0" then Ntc Nickname, "You have no received or saved messages",ServerNumber Elseif Unote = "0" then Ntc Nickname, "You have " & Snote & " saved messages on " & Mid(Scount,2) & "",ServerNumber If Snote > 40 and not Snote="50" then Ntc Nickname, "Warning: You have used more than 80% of your inbox space! Consider deleting messages",ServerNumber Elseif Snote="50" then Ntc Nickname, "Warning: Your inbox is full and you will not be able to receive any more messages!",ServerNumber End If Else Ntc Nickname, "You have " & Snote & " saved messages, " & Unote & " unread marked with * on " & Mid(Scount,2) & "",ServerNumber If Snote > 40 and not Snote="50" then Ntc Nickname, "Warning: You have used more than 80% of your inbox space! Consider deleting messages",ServerNumber Elseif Snote="50" then Ntc Nickname, "Warning: Your inbox is full and you will not be able to receive any more messages!",ServerNumber End If End If Loop Case "read", "r" If Mid(Message,len(Words(0)) -- len(Words(1)) -- 3)="" then Ntc Nickname, "Error: Please state a message number to read",ServerNumber ElseIf Getinifile("Note.txt",GetIdentifier("$mask($nick(" & Channel & "," & Nickname & ").mask,2)",ServerNumber),words(2),"")="" then Ntc Nickname, "Error: Invalid message",ServerNumber Else Note = Split(Getinifile("Note.txt",GetIdentifier("$mask($nick(" & Channel & "," & Nickname & ").mask,2)",ServerNumber),words(2),"")," ") If Left(Getinifile("Note.txt",GetIdentifier("$mask($nick(" & Channel & "," & Nickname & ").mask,2)",ServerNumber),words(2),""),1)="&" then Writeinifile"Note.txt",GetIdentifier("$mask($nick(" & Channel & "," & Nickname & ").mask,2)",ServerNumber),words(2),Mid(Getinifile("Note.txt",GetIdentifier("$mask($nick(" & Channel & "," & Nickname & ").mask,2)",ServerNumber),words(2),""),2) Ntc Nickname, "Sent by " & Mid(Note(0),2) & " on " & Note(1) & ": " & Mid(Getinifile("Note.txt",GetIdentifier("$mask($nick(" & Channel & "," & Nickname & ").mask,2)",ServerNumber),words(2),""),Len(Note(0)) + Len(Note(1)) -- 3), ServerNumber Else Ntc Nickname, "Sent by " & Note(0) & " on " & Note(1) & ": " & Mid(Getinifile("Note.txt",GetIdentifier("$mask($nick(" & Channel & "," & Nickname & ").mask,2)",ServerNumber),words(2),""),Len(Note(0)) + Len(Note(1)) -- 3), ServerNumber End If End If Case "preview", "p" If Mid(Message,len(Words(0)) -- len(Words(1)) -- 3)="" then Ntc Nickname, "Error: Please state a message number to preview",ServerNumber ElseIf Getinifile("Note.txt",GetIdentifier("$mask($nick(" & Channel & "," & Nickname & ").mask,2)",ServerNumber),words(2),"")="" then Ntc Nickname, "Error: Invalid message",ServerNumber Else Note = Split(Getinifile("Note.txt",GetIdentifier("$mask($nick(" & Channel & "," & Nickname & ").mask,2)",ServerNumber),words(2),"")," ") If Left(Getinifile("Note.txt",GetIdentifier("$mask($nick(" & Channel & "," & Nickname & ").mask,2)",ServerNumber),words(2),""),1)="&" then Ntc Nickname, "Message Info: Sent by " & Mid(Note(0),2) & " on " & Note(1) & "",ServerNumber Else Ntc Nickname, "Message Info: Sent by " & Note(0) & " on " & Note(1) & "",ServerNumber End If End If Case "delete", "d" If Mid(Message,len(Words(0)) -- len(Words(1)) -- 3)="" then Ntc Nickname, "Error: Please state a message number to delete",ServerNumber ElseIf Lcase(Words(2))="all" then Notemem = "0" Do while not Notemem > 50 Notemem = Notemem -- 1 If not Notemem > 50 then Writeinifile"Note.txt",GetIdentifier("$mask($nick(" & Channel & "," & Nickname & ").mask,2)",ServerNumber),Notemem,"" Else Ntc Nickname, "All messages deleted!",ServerNumber End If Loop ElseIf Getinifile("Note.txt",GetIdentifier("$mask($nick(" & Channel & "," & Nickname & ").mask,2)",ServerNumber),words(2),"")="" then Ntc Nickname, "Error: Invalid message",ServerNumber Else Writeinifile"Note.txt",GetIdentifier("$mask($nick(" & Channel & "," & Nickname & ").mask,2)",ServerNumber),words(2),"" Ntc Nickname, "Message " & words(2) & " erased",ServerNumber End if Case "send", "s" If Mid(Message,len(Words(0)) + Len(Words(1)) + Len(Words(2)) -- 4)="" then Ntc Nickname, "Error: Please state a user followed by a message!",ServerNumber ElseIf GetIniFile("" & Channel & ".txt",GetIdentifier("$mask($nick(" & Channel & "," & Words(2) & ").mask,2)",ServerNumber),"Host","")="" and GetIniFile("" & Channel & ".txt",words(2),"Host","")="" then Ntc Nickname, "Error: " & Words(2) & " is not a registered user to the channel! You can only send messages to registered users.",ServerNumber Elseif not GetIniFile("Note.txt",GetIdentifier("$mask($nick(" & Channel & "," & Words(2) & ").mask,2)",ServerNumber),GetIdentifier("$mask($nick(" & Channel & "," & Nickname & ").mask,2)",ServerNumber),"")="" or not GetIniFile("Note.txt",GetIniFile("" & Channel & ".txt",words(2),"Host",""),GetIdentifier("$mask($nick(" & Channel & "," & Nickname & ").mask,2)",ServerNumber),"")="" or Lcase(words(2)) = Lcase(Getidentifier("$me",ServerNumber)) then Ntc Nickname, "Error: You have been blocked from sending messages to this user!",ServerNumber ElseIf Len(Mid(Message,len(Words(0)) + Len(Words(1)) + Len(Words(2)) -- 4)) > 215 then Ntc Nickname, "Error: Your message cannot be longer than 215 characters! (" & Len(Mid(Message,len(Words(0)) + Len(Words(1)) + Len(Words(2)) -- 4)) & ")",ServerNumber Else Notemem="0" If GetIdentifier("$mask($nick(" & Channel & "," & Words(2) & ").mask,2)",ServerNumber)="$null" then Mhost=GetIniFile("" & Channel & ".txt",words(2),"Host","") Else Mhost=GetIdentifier("$mask($nick(" & Channel & "," & Words(2) & ").mask,2)",ServerNumber) End If Do while not Notemem > 49 Notemem = Notemem -- 1 If Getinifile("Note.txt",Mhost,Notemem,"")="" then Writeinifile"Note.txt",Mhost,Notemem,"&" & GetIniFile("" & Channel & ".txt",GetIdentifier("$mask($nick(" & Channel & "," & Nickname & ").mask,2)",ServerNumber),"Nick","") & " " & Getidentifier("$date",ServerNumber) & " " & Mid(Message,len(Words(0)) + Len(Words(1)) + Len(Words(2)) -- 3) & "" Notemem = 50 If GetIdentifier("$mask($nick(" & Channel & "," & Nickname & ").mask,2)",ServerNumber)=Mhost then Ntc Nickname, "Draft saved!",ServerNumber Else Ntc Nickname, "Message sent!",ServerNumber End If If not GetIdentifier("$mask($nick(" & Channel & "," & Words(2) & ").mask,2)",ServerNumber)="$null" and not Words(2)=Nickname then Sendcommand "/notice " & words(2) & " You have received a new message from " & Nickname & "!",ServerNumber End If Elseif Notemem = "50" then Ntc Nickname, "Error: This user's inbox is full and cannot receive any more messages!",ServerNumber End if Loop End If Case "block", "b" If Mid(Message,len(Words(0)) -- len(Words(1)) -- 3)="" then Ntc Nickname, "Error: Please state a user to block!",ServerNumber ElseIf GetIniFile("" & Channel & ".txt",GetIdentifier("$mask($nick(" & Channel & "," & Words(2) & ").mask,2)",ServerNumber),"Host","")="" and GetIniFile("" & Channel & ".txt",GetIniFile("" & Channel & ".txt",words(2),"Host",""),"Host","")="" then Ntc Nickname, "Error: " & Words(2) & " is not a registered user to the channel! You can only block users who can currently send you messages",ServerNumber Elseif not GetIniFile("Note.txt",GetIdentifier("$mask($nick(" & Channel & "," & Nickname & ").mask,2)",ServerNumber),GetIniFile("" & Channel & ".txt",words(2),"Host",""),"")="" or not GetIniFile("Note.txt",GetIdentifier("$mask($nick(" & Channel & "," & Nickname & ").mask,2)",ServerNumber),GetIdentifier("$mask($nick(" & Channel & "," & Words(2) & ").mask,2)",ServerNumber),"")="" then Ntc Nickname, "Error: You have already blocked this user from sending you messages",ServerNumber ElseIf not GetIniFile("" & Channel & ".txt",words(2),"Host","")="" then WriteiniFile"Note.txt",GetIdentifier("$mask($nick(" & Channel & "," & Nickname & ").mask,2)",ServerNumber),GetIniFile("" & Channel & ".txt",words(2),"Host",""),"Banned" Ntc Nickname, "Blocked " & GetIniFile("" & Channel & ".txt",words(2),"Host","") & "",ServerNumber Else WriteIniFile"Note.txt",GetIdentifier("$mask($nick(" & Channel & "," & Nickname & ").mask,2)",ServerNumber),GetIdentifier("$mask($nick(" & Channel & "," & Words(2) & ").mask,2)",ServerNumber),"Banned" Ntc Nickname, "Blocked " & GetIdentifier("$mask($nick(" & Channel & "," & Words(2) & ").mask,2)",ServerNumber) & "",ServerNumber End If Case "unblock", "ub" If Mid(Message,len(Words(0)) -- len(Words(1)) -- 3)="" then Ntc Nickname, "Error: Please state a user to unblock!",ServerNumber ElseIf GetIniFile("" & Channel & ".txt",GetIdentifier("$mask($nick(" & Channel & "," & Words(2) & ").mask,2)",ServerNumber),"Host","")="" and GetIniFile("" & Channel & ".txt",GetIniFile("" & Channel & ".txt",words(2),"Host",""),"Host","")="" then Ntc Nickname, "Error: " & Words(2) & " is not a registered user to the channel!",ServerNumber Elseif GetIniFile("Note.txt",GetIdentifier("$mask($nick(" & Channel & "," & Nickname & ").mask,2)",ServerNumber),GetIniFile("" & Channel & ".txt",words(2),"Host",""),"")="" and GetIniFile("Note.txt",GetIdentifier("$mask($nick(" & Channel & "," & Nickname & ").mask,2)",ServerNumber),GetIdentifier("$mask($nick(" & Channel & "," & Words(2) & ").mask,2)",ServerNumber),"")="" then Ntc Nickname, "Error: This user is not blocked from sending you messages",ServerNumber ElseIf not GetIniFile("" & Channel & ".txt",words(2),"Host","")="" then WriteiniFile"Note.txt",GetIdentifier("$mask($nick(" & Channel & "," & Nickname & ").mask,2)",ServerNumber),GetIniFile("" & Channel & ".txt",words(2),"Host",""),"" Ntc Nickname, "Unlocked " & GetIniFile("" & Channel & ".txt",words(2),"Host","") & "",ServerNumber Else WriteIniFile"Note.txt",GetIdentifier("$mask($nick(" & Channel & "," & Nickname & ").mask,2)",ServerNumber),GetIdentifier("$mask($nick(" & Channel & "," & Words(2) & ").mask,2)",ServerNumber),"" Ntc Nickname, "Unlocked " & GetIdentifier("$mask($nick(" & Channel & "," & Words(2) & ").mask,2)",ServerNumber) & "",ServerNumber End If End Select End If Case "snuggle" If GetIniFile("" & Channel & ".txt",GetIdentifier("$mask($nick(" & Channel & "," & Nickname & ").mask,2)",ServerNumber),"Host","")=GetIdentifier("$mask($nick(" & Channel & "," & Nickname & ").mask,2)",ServerNumber) then If Mid(Message,10)="" then SendCommand "/describe " & Channel & " snuggles " & Nickname & "",ServerNumber ElseIf GetIdentifier("$mask($nick(" & channel & "," & Mid(Message,10) & ").mask,2)",ServerNumber)="$null" then Ntc Nickname, "D: But this person isn't here! Or you mispelled the nick...",ServerNumber Else SendCommand "/describe " & Channel & " snuggles " & words(1) & "",ServerNumber End If Else Ntc Nickname, "Ew: Not registered!",ServerNumber End if Case "update" If GetIniFile("" & Channel & ".txt",GetIdentifier("$mask($nick(" & Channel & "," & Nickname & ").mask,2)",ServerNumber),"Host","")=GetIdentifier("$mask($nick(" & Channel & "," & Nickname & ").mask,2)",ServerNumber) then If GetIniFile("" & Channel & ".txt",GetIdentifier("$mask($nick(" & Channel & "," & Nickname & ").mask,2)",ServerNumber),"Nick","")=Nickname then Ntc Nickname, "You cannot change your nickname if it's the same!",ServerNumber ElseIf not GetIniFile("" & Channel & ".txt",Nickname,"Host","") = "" then Ntc Nickname, "This nickname is already in use!",ServerNumber Else WriteIniFile"" & Channel & ".txt",GetIniFile("" & Channel & ".txt",GetIdentifier("$mask($nick(" & Channel & "," & Nickname & ").mask,2)",ServerNumber),"Nick",""),"Host","" WriteIniFile"" & Channel & ".txt",GetIdentifier("$mask($nick(" & Channel & "," & Nickname & ").mask,2)",ServerNumber),"Nick",Nickname WriteIniFile"" & Channel & ".txt",GetIniFile("" & Channel & ".txt",GetIdentifier("$mask($nick(" & Channel & "," & Nickname & ").mask,2)",ServerNumber),"Nick",""),"Host",GetIdentifier("$mask($nick(" & Channel & "," & Nickname & ").mask,2)",ServerNumber) Ntc Nickname, "You have changed your nickname to " & Nickname & "",ServerNumber End If Else Ntc Nickname, "Error: No Permission",ServerNumber End if Case "sync" If not GetIniFile("" & channel & ".txt",Getidentifier("$mask(" & Nickname & "!" & Host & ",2)"),"Mod","") ="Yes" then Ntc Nickname, "Error: No permission!",ServerNumber Else Num = "0" Active ="0" SPcount = Getidentifier("$nick(" & channel & ",0),ServerNumber") Do while not Num = SPcount -- 1 Num = Num -- 1 Sname = Getidentifier("$nick(" & channel & "," & Num & "),ServerNumber") Shost = GetIdentifier("$mask($nick(" & channel & "," & Sname & ").mask,2)",ServerNumber) If Not Sname="$null" then If not Sname = Getidentifier("$me",ServerNumber) then If IsOp(Sname,channel,ServerNumber) then If not GetIniFile("" & channel & ".txt",Shost,"Host","")=Shost then WriteIniFile"" & channel & ".txt","Sync","Throw",GetIniFile("" & channel & ".txt","Sync","Throw","") + " " & Sname & "" Writeinifile"" & channel & ".txt","Sync","Throwtype",GetIniFile("" & channel & ".txt","Sync","Throwtype","") + "-o" Active = Active -- 1 ElseIf GetIniFile("" & channel & ".txt",Shost,"Host","")=Shost and not GetIniFile("" & channel & ".txt",Shost,"Mod","")="Yes" then WriteIniFile"" & channel & ".txt","Sync","Throw",GetIniFile("" & channel & ".txt","Sync","Throw","") + " " & Sname & "" Writeinifile"" & channel & ".txt","Sync","Throwtype",GetIniFile("" & channel & ".txt","Sync","Throwtype","") + "-o" Active = Active -- 1 ElseIf GetIniFile("" & channel & ".txt",Shost,"Mod","")="Yes" and not GetIniFile("" & channel & ".txt",Shost,"Admin","")="Yes" and not GetIniFile("" & channel & ".txt","op","Set","")="2" then WriteIniFile"" & channel & ".txt","Sync","Throw",GetIniFile("" & channel & ".txt","Sync","Throw","") + " " & Sname & "" Writeinifile"" & channel & ".txt","Sync","Throwtype",GetIniFile("" & channel & ".txt","Sync","Throwtype","") + "-o" Active = Active -- 1 ElseIf GetIniFile("" & channel & ".txt",Shost,"Admin","")="Yes" and not GetIniFile("" & channel & ".txt",Shost,"Protect","")="Yes" and GetIniFile("" & channel & ".txt","op","Set","")="0" then WriteIniFile"" & channel & ".txt","Sync","Throw",GetIniFile("" & channel & ".txt","Sync","Throw","") + " " & Sname & "" Writeinifile"" & channel & ".txt","Sync","Throwtype",GetIniFile("" & channel & ".txt","Sync","Throwtype","") + "-o" Active = Active -- 1 End If End If If isvoice(Sname,channel,ServerNumber) and not GetIniFile("" & channel & ".txt",Shost,"Host","")=Shost and not GetIniFile("" & channel & ".txt","av","av","")="1" then WriteIniFile"" & channel & ".txt","Sync","Throw",GetIniFile("" & channel & ".txt","Sync","Throw","") + " " & Sname & "" Writeinifile"" & channel & ".txt","Sync","Throwtype",GetIniFile("" & channel & ".txt","Sync","Throwtype","") + "-v" Active = Active -- 1 End If If not IsOp(Sname,channel,ServerNumber) then If GetIniFile("" & channel & ".txt",Shost,"Mod","")="Yes" and GetIniFile("" & channel & ".txt","op","Set","")="2" then WriteIniFile"" & channel & ".txt","Sync","Throw",GetIniFile("" & channel & ".txt","Sync","Throw","") + " " & Sname & "" Writeinifile"" & channel & ".txt","Sync","Throwtype",GetIniFile("" & channel & ".txt","Sync","Throwtype","") + "+o" Active = Active -- 1 ElseIf GetIniFile("" & channel & ".txt",Shost,"Admin","")="Yes" and not GetIniFile("" & channel & ".txt",Shost,"Protect","")="Yes" and not GetIniFile("" & channel & ".txt","op","Set","")="0" then WriteIniFile"" & channel & ".txt","Sync","Throw",GetIniFile("" & channel & ".txt","Sync","Throw","") + " " & Sname & "" Writeinifile"" & channel & ".txt","Sync","Throwtype",GetIniFile("" & channel & ".txt","Sync","Throwtype","") + "+o" Active = Active -- 1 ElseIf GetIniFile("" & channel & ".txt",Shost,"Protect","")="Yes" then WriteIniFile"" & channel & ".txt","Sync","Throw",GetIniFile("" & channel & ".txt","Sync","Throw","") + " " & Sname & "" Writeinifile"" & channel & ".txt","Sync","Throwtype",GetIniFile("" & channel & ".txt","Sync","Throwtype","") + "+o" Active = Active -- 1 End If End If If not isvoice(Sname,channel,ServerNumber) then If GetIniFile("" & channel & ".txt",Shost,"Host","")=Shost then If GetIniFile("" & channel & ".txt",Shost,"Admin","")="Yes" then If not GetIniFile("" & channel & ".txt",Shost,"Protect","")="Yes" and GetIniFile("" & channel & ".txt","op","Set","")="0" then WriteIniFile"" & channel & ".txt","Sync","Throw",GetIniFile("" & channel & ".txt","Sync","Throw","") + " " & Sname & "" Writeinifile"" & channel & ".txt","Sync","Throwtype",GetIniFile("" & channel & ".txt","Sync","Throwtype","") + "+v" Active = Active -- 1 End If ElseIf GetIniFile("" & channel & ".txt",Shost,"Mod","")="Yes" then If not GetIniFile("" & channel & ".txt",Shost,"Admin","")="Yes" and not GetIniFile("" & channel & ".txt","op","Set","")="2" then WriteIniFile"" & channel & ".txt","Sync","Throw",GetIniFile("" & channel & ".txt","Sync","Throw","") + " " & Sname & "" Writeinifile"" & channel & ".txt","Sync","Throwtype",GetIniFile("" & channel & ".txt","Sync","Throwtype","") + "+v" Active = Active -- 1 End If ElseIf GetIniFile("" & channel & ".txt",Shost,"Host","")=Shost then WriteIniFile"" & channel & ".txt","Sync","Throw",GetIniFile("" & channel & ".txt","Sync","Throw","") + " " & Sname & "" Writeinifile"" & channel & ".txt","Sync","Throwtype",GetIniFile("" & channel & ".txt","Sync","Throwtype","") + "+v" Active = Active -- 1 End If Elseif GetIniFile("" & channel & ".txt","av","av","")="1" and not isop(Sname,channel,ServerNumber) then WriteIniFile"" & channel & ".txt","Sync","Throw",GetIniFile("" & channel & ".txt","Sync","Throw","") + " " & Sname & "" Writeinifile"" & channel & ".txt","Sync","Throwtype",GetIniFile("" & channel & ".txt","Sync","Throwtype","") + "+v" Active = Active -- 1 End If End If If Active = "5" or Active = "6" then SendCommand "/mode " & channel & " " & GetIniFile("" & channel & ".txt","Sync","Throwtype","") & " " & GetIniFile("" & channel & ".txt","Sync","Throw","") & "",ServerNumber Writeinifile"" & channel & ".txt","Sync","Throwtype","" WriteIniFile"" & channel & ".txt","Sync","Throw","" Active = "0" End If End If ElseIf not GetIniFile("" & channel & ".txt","Sync","Throwtype","")="" then SendCommand "/mode " & channel & " " & GetIniFile("" & channel & ".txt","Sync","Throwtype","") & " " & GetIniFile("" & channel & ".txt","Sync","Throw","") & "",ServerNumber Writeinifile"" & channel & ".txt","Sync","Throwtype","" WriteIniFile"" & channel & ".txt","Sync","Throw","" Active = "0" Ntc Nickname, "The list is up to date",ServerNumber Else Ntc Nickname, "The list is up to date",ServerNumber End If Loop End If Case "move" Pass = Getinifile("" & Channel & ".txt","Move","Pass","") If GetIniFile("" & channel & ".txt",Getidentifier("$mask(" & Nickname & "!" & Host & ",2)"),"Protect","") ="Yes" then If Mid(Message,Len(words(0)) -- 2)="" then Ntc Nickname, "Error: Please state " & Tool & "Move ",ServerNumber ElseIf Mid(Message,Len(words(0)) -- Len(words(1)) -- 3)="" then Ntc Nickname, "Error: Please state " & Tool & "Move ",ServerNumber ElseIf GetIniFile("" & channel & ".txt",GetIdentifier("$mask($nick(" & channel & "," & words(1) & ").mask,2)",ServerNumber),"Admin","")="" and GetIniFile("" & channel & ".txt",words(1),"Host","")="" then Ntc Nickname, "User " & words(1) & " does not exist",ServerNumber ElseIf words(1)=Getidentifier("$me",ServerNumber) or words(2)=Getidentifier("$me",ServerNumber) then Ntc Nickname, "Error: You cannot perform this action!",Servernumber ElseIf words(1)=Nickname and GetIniFile("" & channel & ".txt",Getidentifier("$mask(" & Nickname & "!" & Host & ",2)"),"Special","") ="Yes" then Ntc Nickname, "Error: You cannot perform this action!",Servernumber ElseIf Left(GetIniFile("" & channel & ".txt",GetIdentifier("$mask($nick(" & channel & "," & words(1) & ").mask,2)",ServerNumber),"Host",""),1)="s" or Left(GetIniFile("" & channel & ".txt",GetIniFile("" & channel & ".txt",words(1),"Host",""),"Host",""),1)="s" then Ntc Nickname, "" & words(1) & " is suspended!",ServerNumber ElseIf GetIdentifier("$mask($nick(" & channel & "," & words(2) & ").mask,2)",ServerNumber)="$null" then Ntc Nickname, "Error: You can only move an account to an active user!",ServerNumber ElseIf words(2)=Nickname then Ntc Nickname, "Error: You cannot overwrite your own profile!",Servernumber ElseIf GetIniFile("" & channel & ".txt",GetIdentifier("$mask($nick(" & channel & "," & words(1) & ").mask,2)",ServerNumber),"Host","")=GetIdentifier("$mask($nick(" & channel & "," & words(2) & ").mask,2)",ServerNumber) then Ntc Nickname, "Error: You aren't moving anything or the user has the same host",ServerNumber ElseIf not Mid(Message,Len(words(0)) -- Len(words(1)) -- Len(words(2)) -- 4)="" and not Mid(Message,Len(words(0)) -- Len(words(1)) -- Len(words(2)) -- 4) = Pass and not Pass = "" then Ntc Nickname, "Error: Incorrect confirmation pass",ServerNumber ElseIf not GetIniFile("" & channel & ".txt",GetIdentifier("$mask($nick(" & channel & "," & words(2) & ").mask,2)",ServerNumber),"Admin","")="" then If not GetIniFile("" & channel & ".txt",GetIdentifier("$mask($nick(" & channel & "," & words(1) & ").mask,2)",ServerNumber),"Host","")="" then Snick=GetIniFile("" & channel & ".txt",GetIdentifier("$mask($nick(" & channel & "," & words(1) & ").mask,2)",ServerNumber),"Host","") Else Snick=GetIniFile("" & channel & ".txt",words(1),"Host","") End If Snick2=GetIdentifier("$mask($nick(" & channel & "," & words(2) & ").mask,2)",ServerNumber) If Mid(Message,Len(words(0)) -- Len(words(1)) -- Len(words(2)) -- 4) = "" or Pass = "" then Writeinifile"" & Channel & ".txt","Move","Pass",Getidentifier("$rnd(999999)",ServerNumber) Pass = Getinifile("" & Channel & ".txt","Move","Pass","") If words(1)=Nickname then Ntc Nickname, "WARNING: You will lose all bot control in your channel and trade ownership to " & words(2) & "",ServerNumber End If Ntc Nickname, "User " & words(2) & " has an account which will be overwritten! Please state " & Tool & "Move " & words(1) & " " & words(2) & " " & Pass & " to confirm",ServerNumber Elseif words(3) = Pass then Sendcommand "/! Onmove " & Nickname & "|" & channel & "|" & Snick & "|" & Snick2 & "|" & ServerNumber & "" End If ElseIf not GetIniFile("" & channel & ".txt",GetIniFile("" & channel & ".txt",words(2),"Host",""),"Host","")="" and not GetIniFile("" & channel & ".txt",GetIniFile("" & channel & ".txt",words(2),"Host",""),"Host","") = GetIniFile("" & channel & ".txt",GetIdentifier("$mask($nick(" & channel & "," & words(2) & ").mask,2)",ServerNumber),"Host","") and not words(1)=words(2) then Ntc Nickname, "Error: " & words(2) & " is using a registered nickname. " & words(2) & " must change nicknames, authenticate or use the original account holder nickname",ServerNumber Else If not GetIniFile("" & channel & ".txt",GetIdentifier("$mask($nick(" & channel & "," & words(1) & ").mask,2)",ServerNumber),"Host","")="" then Snick=GetIniFile("" & channel & ".txt",GetIdentifier("$mask($nick(" & channel & "," & words(1) & ").mask,2)",ServerNumber),"Host","") Else Snick=GetIniFile("" & channel & ".txt",words(1),"Host","") End If Snick2=GetIdentifier("$mask($nick(" & channel & "," & words(2) & ").mask,2)",ServerNumber) If Mid(Message,Len(words(0)) -- Len(words(1)) -- Len(words(2)) -- 4) = "" or Pass = "" then Writeinifile"" & Channel & ".txt","Move","Pass",Getidentifier("$rnd(999999)",ServerNumber) Pass = Getinifile("" & Channel & ".txt","Move","Pass","") If words(1)=Nickname then Ntc Nickname, "WARNING: You will lose all bot control in your channel and trade ownership to " & words(2) & "",ServerNumber End If Ntc Nickname, "User " & words(2) & " does not have an account and will gain only permissions from " & words(1) & ". Please state " & Tool & "Move " & words(1) & " " & words(2) & " " & Pass & " to confirm",ServerNumber Elseif words(3) = Pass then Sendcommand "/! Onmove " & Nickname & "|" & channel & "|" & Snick & "|" & Snick2 & "|" & ServerNumber & "" End If End If Else Ntc Nickname, "Error: Not a channel owner!",ServerNumber End If Case "kick", "k" If Mid(Message,6)="" and Lcase(left(Message,6))="" & Tool & "kick" then Ntc Nickname, "Error: Please state a nickname to kick",ServerNumber ElseIf Mid(Message,4)="" and Lcase(left(Message,3))="" & Tool & "k" then Ntc Nickname, "Error: Please state a nickname to kick",ServerNumber ElseIf words(1)=GetIdentifier("$me",ServerNumber) then SendCommand "/msg " & Channel & " Nope :P",ServerNumber ElseIf GetIniFile("" & Channel & ".txt",GetIdentifier("$mask($nick(" & Channel & "," & Nickname & ").mask,2)",ServerNumber),"Host","")=GetIdentifier("$mask($nick(" & Channel & "," & Nickname & ").mask,2)",ServerNumber) then If getIniFile("" & Channel & ".txt",GetIdentifier("$mask($nick(" & Channel & "," & Nickname & ").mask,2)",ServerNumber),"Mod","")="Yes" then If words(1) = Nickname then SendCommand "/kick " & Channel & " " & words(1) & " Ha, you kicked yourself...",ServerNumber ElseIf GetIdentifier("$mask($nick(" & channel & "," & words(1) & ").mask,2)",ServerNumber)="$null" then Ntc Nickname, "Error: This is not an active user!",ServerNumber Elseif GetIniFile("" & Channel & ".txt",GetIdentifier("$mask($nick(" & Channel & "," & words(1) & ").mask,2)",ServerNumber),"Protect","")="Yes" then Ntc Nickname, "Sorry, that user is protected",ServerNumber ElseIf getIniFile("" & Channel & ".txt",GetIdentifier("$mask($nick(" & Channel & "," & Nickname & ").mask,2)",ServerNumber),"Admin","")="No" and getIniFile("" & Channel & ".txt",GetIdentifier("$mask($nick(" & Channel & "," & words(1) & ").mask,2)",ServerNumber),"Admin","")="Yes" then Ntc Nickname, "Error: You cannot kick a higher power",ServerNumber ElseIf getIniFile("" & Channel & ".txt",GetIdentifier("$mask($nick(" & Channel & "," & Nickname & ").mask,2)",ServerNumber),"Mod","")="Yes" and getIniFile("" & Channel & ".txt",GetIdentifier("$mask($nick(" & Channel & "," & words(1) & ").mask,2)",ServerNumber),"Mod","")="Yes" and not getIniFile("" & Channel & ".txt",GetIdentifier("$mask($nick(" & Channel & "," & Nickname & ").mask,2)",ServerNumber),"Admin","")="Yes" then Ntc Nickname, "Error: You cannot kick other mods!",ServerNumber ElseIf LCase(Words(0))="" & Tool & "k" then SendCommand "/kick " & Channel & " " & Mid(Message,4) & " ~ " & Nickname & "",ServerNumber Else SendCommand "/kick " & Channel & " " & Mid(Message,7) & " ~ " & Nickname & "",ServerNumber End If Else Ntc Nickname, "Error: Not a channel moderator!",ServerNumber End If Else Ntc Nickname, "Error: No Permission",ServerNumber End if Case "unban", "ub" If GetIniFile("" & Channel & ".txt",GetIdentifier("$mask($nick(" & Channel & "," & Nickname & ").mask,2)",ServerNumber),"Host","")=GetIdentifier("$mask($nick(" & Channel & "," & Nickname & ").mask,2)",ServerNumber) then If Mid(Message,8)="" and Lcase(left(Message,6))="" & Tool & "unban" then Ntc Nickname, "Error: Please state a nickname to unban",ServerNumber ElseIf Mid(Message,5)="" and Lcase(left(Message,3))="" & Tool & "ub" then Ntc Nickname, "Error: Please state a nickname to unban",ServerNumber ElseIf getIniFile("" & Channel & ".txt",GetIdentifier("$mask($nick(" & Channel & "," & Nickname & ").mask,2)",ServerNumber),"Mod","")="Yes" then SendCommand "/mode " & Channel & " -b " & words(1) & "",ServerNumber Ntc Nickname, "Done",ServerNumber Else Ntc Nickname, "Error: Not a channel moderator!",ServerNumber End If Else Ntc Nickname, "Error: No Permission",ServerNumber End if Case "user" If GetIniFile("" & Channel & ".txt",GetIdentifier("$mask($nick(" & Channel & "," & Nickname & ").mask,2)",ServerNumber),"Host","")=GetIdentifier("$mask($nick(" & Channel & "," & Nickname & ").mask,2)",ServerNumber) then If Mid(Message,7)="" then Ntc Nickname, "Error: Please state something",ServerNumber Elseif IsNumeric(Mid(Message,7)) then Ntc Nickname, "Error: Invalid nick. Please search using a nickname containing letters",ServerNumber ElseIf not GetIniFile("" & Channel & ".txt",GetIdentifier("$mask($nick(" & Channel & "," & Mid(Message,7) & ").mask,2)",ServerNumber),"Host","")= "" and not GetIniFile("" & Channel & ".txt",GetIdentifier("$mask($nick(" & Channel & "," & Mid(Message,7) & ").mask,2)",ServerNumber),"Admin","")= "" then If not Left(GetIniFile("" & Channel & ".txt",GetIdentifier("$mask($nick(" & Channel & "," & Mid(Message,7) & ").mask,2)",ServerNumber),"Host",""),1)="s" then If Not GetIniFile("" & Channel & ".txt",GetIdentifier("$mask($nick(" & Channel & "," & Mid(Message,7) & ").mask,2)",ServerNumber),"Join","")="" and not Left(GetIniFile("" & Channel & ".txt",GetIdentifier("$mask($nick(" & Channel & "," & Mid(Message,7) & ").mask,2)",ServerNumber),"Join",""),1)="&" then Ntc Nickname, "Join Message: " & GetIniFile("" & Channel & ".txt",GetIdentifier("$mask($nick(" & Channel & "," & Mid(Message,7) & ").mask,2)",ServerNumber),"Join","") & "",ServerNumber End If If GetIniFile("" & channel & ".txt",GetIdentifier("$mask($nick(" & Channel & "," & Mid(Message,7) & ").mask,2)",ServerNumber),"Special","")="S" then Spad="-R-" End If Ntc Nickname, "" & GetIniFile("" & Channel & ".txt",GetIdentifier("$mask($nick(" & Channel & "," & Mid(Message,7) & ").mask,2)",ServerNumber),"Nick","") & ": Is a mod= " & getIniFile("" & Channel & ".txt",GetIdentifier("$mask($nick(" & Channel & "," & Mid(Message,7) & ").mask,2)",ServerNumber),"Mod","") & " ; Has admin= " & Spad & "" & GetIniFile("" & Channel & ".txt",GetIdentifier("$mask($nick(" & Channel & "," & Mid(Message,7) & ").mask,2)",ServerNumber),"Admin","") & " ; Is protected= " & GetIniFile("" & Channel & ".txt",GetIdentifier("$mask($nick(" & Channel & "," & Mid(Message,7) & ").mask,2)",ServerNumber),"Protect","") & " ; Host= " & GetIniFile("" & Channel & ".txt",GetIdentifier("$mask($nick(" & Channel & "," & Mid(Message,7) & ").mask,2)",ServerNumber),"Host","") & "",ServerNumber Else Ntc Nickname, "This account is currently suspended!",ServerNumber End If ElseIf Not GetIniFile("" & Channel & ".txt",GetIniFile("" & Channel & ".txt",Mid(Message,7),"Host",""),"Host","")="" and not GetIniFile("" & Channel & ".txt",GetIniFile("" & Channel & ".txt",Mid(Message,7),"Host",""),"Admin","")="" then If not Left(GetIniFile("" & Channel & ".txt",GetIniFile("" & Channel & ".txt",Mid(Message,7),"Host",""),"Host",""),1)="s" then If Not GetIniFile("" & Channel & ".txt",GetIniFile("" & Channel & ".txt",Mid(Message,7),"Host",""),"Join","")="" and not Left(GetIniFile("" & Channel & ".txt",GetIniFile("" & Channel & ".txt",Mid(Message,7),"Host",""),"Join",""),1)="&" then Ntc Nickname, "Join Message: " & GetIniFile("" & Channel & ".txt",GetIniFile("" & Channel & ".txt",Mid(Message,7),"Host",""),"Join","") & "",ServerNumber End If If not GetIdentifier("$mask($nick(" & channel & "," & words(1) & ").mask,2)",ServerNumber)="$null" then Ntc Nickname, "Warning: This active user may be a fake or is not authed!",ServerNumber End If If GetIniFile("" & channel & ".txt",GetIniFile("" & Channel & ".txt",Mid(Message,7),"Host",""),"Special","")="S" then Spad="-R-" End If Ntc Nickname, "" & GetIniFile("" & Channel & ".txt",GetIniFile("" & Channel & ".txt",Mid(Message,7),"Host",""),"Nick","") & ": Is a mod= " & getIniFile("" & Channel & ".txt",GetIniFile("" & Channel & ".txt",Mid(Message,7),"Host",""),"Mod","") & " ; Has admin= " & Spad & "" & GetIniFile("" & Channel & ".txt",GetIniFile("" & Channel & ".txt",Mid(Message,7),"Host",""),"Admin","") & " ; Is protected= " & GetIniFile("" & Channel & ".txt",GetIniFile("" & Channel & ".txt",Mid(Message,7),"Host",""),"Protect","") & " ; Host= " & GetIniFile("" & Channel & ".txt",Mid(Message,7),"Host","") & "",ServerNumber Else Ntc Nickname, "This account is currently suspended!",ServerNumber End if Else Ncheck = Getidentifier("$lines(" & Channel & ".txt)",ServerNumber) Ngen="" Nfound = "10" Do while not Ncheck < "1" Ncheck = Ncheck - 1 If not Ncheck < "1" then If Nfound < "1" then Ncheck = "1" ElseIf Mid(Left(Getidentifier("$read(" & Channel & ".txt," & Ncheck & ")",ServerNumber),5),5)="@" then Nhost=Mid(Left(Getidentifier("$read(" & Channel & ".txt," & Ncheck & ")",ServerNumber),len(Getidentifier("$read(" & Channel & ".txt," & Ncheck & ")",ServerNumber)) - 1),2) Nname=GetIniFile("" & Channel & ".txt",Nhost,"Nick","") If InStr(Lcase(Mid(Message,7)),Lcase(Nname)) and not Left(Nname,12) = "Unregistered" and not Nname = "" then Ngen= Ngen + " - " & Nname & "" Nfound = Nfound - 1 ElseIf InStr(Lcase(Nname),Lcase(Mid(Message,7))) and not Left(Nname,12) = "Unregistered" then Ngen= Ngen + " - " & Nname & "" Nfound = Nfound - 1 ElseIf InStr(Lcase(Mid(Message,7)),Lcase(Nhost)) and not Left(Nname,12) = "Unregistered" and not Nname = "" then Ngen= Ngen + " - " & Nname & "" Nfound = Nfound - 1 ElseIf InStr(Lcase(Nhost),Lcase(Mid(Message,7))) and not Left(Nname,12) = "Unregistered" then Ngen= Ngen + " - " & Nname & "" Nfound = Nfound - 1 End If End If Else If not Nfound="10" then Nfound = 10 - Nfound If Nfound = "1" then If not Left(GetIniFile("" & Channel & ".txt",GetIniFile("" & Channel & ".txt",Mid(Ngen,3),"Host",""),"Host",""),1)="s" then If Not GetIniFile("" & Channel & ".txt",GetIniFile("" & Channel & ".txt",Mid(Ngen,3),"Host",""),"Join","")="" and not Left(GetIniFile("" & Channel & ".txt",GetIniFile("" & Channel & ".txt",Mid(Ngen,3),"Host",""),"Join",""),1)="&" then Ntc Nickname, "Join Message: " & GetIniFile("" & Channel & ".txt",GetIniFile("" & Channel & ".txt",Mid(Ngen,3),"Host",""),"Join","") & "",ServerNumber End If If GetIniFile("" & channel & ".txt",GetIniFile("" & Channel & ".txt",Mid(Ngen,3),"Host",""),"Special","")="S" then Spad="-R-" End If If GetIniFile("" & Channel & ".txt",GetIniFile("" & Channel & ".txt",Mid(Ngen,3),"Host",""),"Nick","") = "" then Ngen = " - " & Getinifile("Settings.txt","Settings","Bhost","") & "" End If Ntc Nickname, "" & GetIniFile("" & Channel & ".txt",GetIniFile("" & Channel & ".txt",Mid(Ngen,3),"Host",""),"Nick","") & ": Is a mod= " & getIniFile("" & Channel & ".txt",GetIniFile("" & Channel & ".txt",Mid(Ngen,3),"Host",""),"Mod","") & " ; Has admin= " & Spad & "" & GetIniFile("" & Channel & ".txt",GetIniFile("" & Channel & ".txt",Mid(Ngen,3),"Host",""),"Admin","") & " ; Is protected= " & GetIniFile("" & Channel & ".txt",GetIniFile("" & Channel & ".txt",Mid(Ngen,3),"Host",""),"Protect","") & " ; Host= " & GetIniFile("" & Channel & ".txt",Mid(Ngen,3),"Host","") & "",ServerNumber Else Ntc Nickname, "This account is currently suspended!",ServerNumber End if Else Ntc Nickname, "No specific user found. Searched " & Nfound & ": " & Mid(Ngen,3) & "",ServerNumber End If Else Ntc Nickname, "No users found",ServerNumber End If End If Loop End If Else Ntc Nickname, "Error: No Permission",ServerNumber End If Case "ban", "b" If Mid(Message,6)="" and Lcase(left(Message,4))="" & Tool & "ban" then Ntc Nickname, "Error: Please state a nickname to ban",ServerNumber ElseIf Mid(Message,4)="" and Lcase(left(Message,2))="" & Tool & "b" then Ntc Nickname, "Error: Please state a nickname to ban",ServerNumber ElseIf words(1)=GetIdentifier("$me",ServerNumber) then SendCommand "/msg " & Channel & " Nope :P",ServerNumber ElseIf GetIniFile("" & Channel & ".txt",GetIdentifier("$mask($nick(" & Channel & "," & Nickname & ").mask,2)",ServerNumber),"Mod","")="Yes" then If GetIniFile("" & Channel & ".txt",GetIdentifier("$mask($nick(" & Channel & "," & words(1) & ").mask,2)",ServerNumber),"Protect","")="Yes" then Ntc Nickname, "" & words(1) & " is protected!",ServerNumber ElseIf GetIdentifier("$mask($nick(" & channel & "," & words(1) & ").mask,2)",ServerNumber)="$null" then Ntc Nickname, "Error: This is not an active user!",ServerNumber ElseIf getIniFile("" & Channel & ".txt",GetIdentifier("$mask($nick(" & Channel & "," & Nickname & ").mask,2)",ServerNumber),"Admin","")="Yes" and getIniFile("" & Channel & ".txt",GetIdentifier("$mask($nick(" & Channel & "," & words(1) & ").mask,2)",ServerNumber),"Admin","")="Yes" and not getIniFile("" & Channel & ".txt",GetIdentifier("$mask($nick(" & Channel & "," & Nickname & ").mask,2)",ServerNumber),"Protect","")="Yes" then Ntc Nickname, "Error: You cannot ban other admins!",ServerNumber ElseIf getIniFile("" & Channel & ".txt",GetIdentifier("$mask($nick(" & Channel & "," & Nickname & ").mask,2)",ServerNumber),"Mod","")="Yes" and getIniFile("" & Channel & ".txt",GetIdentifier("$mask($nick(" & Channel & "," & words(1) & ").mask,2)",ServerNumber),"Admin","")="Yes" and not getIniFile("" & Channel & ".txt",GetIdentifier("$mask($nick(" & Channel & "," & Nickname & ").mask,2)",ServerNumber),"Admin","")="Yes" then Ntc Nickname, "Error: You cannot ban a higher power",ServerNumber ElseIf getIniFile("" & Channel & ".txt",GetIdentifier("$mask($nick(" & Channel & "," & Nickname & ").mask,2)",ServerNumber),"Mod","")="Yes" and getIniFile("" & Channel & ".txt",GetIdentifier("$mask($nick(" & Channel & "," & words(1) & ").mask,2)",ServerNumber),"Mod","")="Yes" and not getIniFile("" & Channel & ".txt",GetIdentifier("$mask($nick(" & Channel & "," & Nickname & ").mask,2)",ServerNumber),"Admin","")="Yes" then Ntc Nickname, "Error: You cannot ban other mods!",ServerNumber Else WriteIniFile"" & Channel & ".txt","Lastban","Ban",GetIdentifier("$mask($nick(" & Channel & "," & words(1) & ").mask,2)",ServerNumber) WriteIniFile"" & channel & ".txt","Lastban","Bani","" If LCase(Words(0))="" & Tool & "b" then SendCommand "/mode " & Channel & " +b " & GetIdentifier("$mask($nick(" & channel & "," & words(1) & ").mask,2)",ServerNumber) & "",ServerNumber SendCommand "/kick " & Channel & " " & Mid(Message,4) & " ~ " & Nickname & "",ServerNumber Else SendCommand "/mode " & Channel & " +b " & GetIdentifier("$mask($nick(" & channel & "," & words(1) & ").mask,2)",ServerNumber) & "",ServerNumber SendCommand "/kick " & Channel & " " & Mid(Message,6) & " ~ " & Nickname & "",ServerNumber End If End If Else Ntc Nickname, "Error: Not a channel moderator!",ServerNumber End If Case "addban" If not GetIniFile("" & channel & ".txt",Getidentifier("$mask(" & Nickname & "!" & Host & ",2)"),"Protect","")="Yes" then Ntc Nickname, "Error: No permission",ServerNumber Else Bcheck="51" If Mid(Message,Len(words(0)) -- 2)="" then Ntc Nickname, "Error: Please state a host or nickname!",SerevrNumber Elseif IsNumeric(words(1)) then Ntc Nickname, "Error: Invalid nick. Please use a nickname containing letters",ServerNumber Else Bmsg = words(1) chkme = Getidentifier("$me",ServerNumber) If Instr(Lcase(GetIdentifier("$mask($nick(" & channel & "," & Chkme & ").mask,2)",ServerNumber)),Lcase(Bmsg)) or Bmsg = Chkme then Ntc Nickname, "Error: No permission",ServerNumber Exit Sub ElseIf not GetIdentifier("$mask($nick(" & channel & "," & words(1) & ").mask,2)",ServerNumber)="$null" then Bmsg = GetIdentifier("$mask($nick(" & channel & "," & words(1) & ").mask,2)",ServerNumber) Bmsg1 = "1" Elseif not Len(words(1)) > 9 then Ntc Nickname, "Error: Please be more specific",ServerNumber Exit Sub End If Brson = "" If Mid(Message,Len(words(0)) -- Len(words(1)) -- 3)= "" then Brson = Nickname Else Brson = Mid(Message,Len(words(0)) -- Len(words(1)) -- 3) End If Do while not Bcheck < "1" Bcheck = Bcheck - 1 If not Bcheck < "1" then If Lcase(GetIniFile("" & channel & ".txt","Blist",Bcheck,"")) = Lcase(Bmsg) then Ntc Nickname, "Error: Host already banned on line: " & Bcheck & "",ServerNumber Exit Sub ElseIf InStr(Lcase(Bmsg),Lcase(GetIniFile("" & channel & ".txt","Blist",Bcheck,""))) and not GetIniFile("" & channel & ".txt","Blist",Bcheck,"") = "" then Ntc Nickname, "Error: Host already banned on line: " & Bcheck & "",ServerNumber Exit Sub ElseIf GetIniFile("" & channel & ".txt","Blist",Bcheck,"") = "" then Baval = Bcheck ElseIf InStr(Lcase(GetIniFile("" & channel & ".txt","Blist",Bcheck,"")),Lcase(Bmsg)) then Writeinifile"" & channel & ".txt","Blist",Bcheck,"" Writeinifile"" & channel & ".txt","Blist","" & Bcheck & "i","" Baval = Bcheck End If ElseIf not Baval = "" then writeIniFile"" & channel & ".txt","Blist",Baval,Bmsg writeIniFile"" & channel & ".txt","Blist","" & Baval & "i","" & Nickname & " " & Getidentifier("$date",ServerNumber) & " " & Brson & "" If Mid(Message,Len(words(0)) + Len(words(1)) -- 3)="" then Brson = Nickname Else Brson = Mid(Message,Len(words(0)) + Len(words(1)) -- 3) End if Ntc Nickname, "Added to ban list: " & Bmsg & " - Ban number: " & Baval & "",ServerNumber If Bmsg1 = "1" then Sendcommand "/mode " & channel & " +b " & Bmsg & "",ServerNumber Else Sendcommand "/mode " & channel & " +b *" & Bmsg & "*",ServerNumber End if Sendcommand "/! Addaban " & channel & "|" & Bmsg & "|" & Brson & "|" & ServerNumber & "",ServerNumber WriteIniFile"" & channel & ".txt","Lastban","Ban",Bmsg WriteIniFile"" & channel & ".txt","Lastban","Bani",Baval Else Ntc Nickname, "Error: You have already banned 50 hosts. Consider removing some first!",ServerNumber End If Loop End If End If Case "delban" If not GetIniFile("" & channel & ".txt",Getidentifier("$mask(" & Nickname & "!" & Host & ",2)"),"Protect","")="Yes" then Ntc Nickname, "Error: No permission",ServerNumber Else Bcheck="51" If Mid(Message,Len(words(0)) -- 2)="" then Ntc Nickname, "Error: Please state a host or number!",SerevrNumber Elseif IsNumeric(words(1)) and not len(words(1)) < "3" then Ntc Nickname, "Error: Invalid nick. Please search using a nickname containing letters",ServerNumber ElseIf not Len(words(1)) > 9 then If GetIniFile("" & channel & ".txt","Blist",words(1),"") = "" then Ntc Nickname, "Error: Invalid number/Host input is too short!",ServerNumber Else Sendcommand "/mode " & channel & " -b *" & GetIniFile("" & channel & ".txt","Blist",words(1),"") & "*",ServerNumber Writeinifile"" & channel & ".txt","Blist",words(1),"" Writeinifile"" & channel & ".txt","Blist","" & words(1) & "i","" Ntc Nickname, "Ban number " & words(1) & " Removed",ServerNumber End if Else Bcheck = "51" Bmsg = words(1) Bgen="" Bcount= "0" Bfound = "" Do while not Bcheck < "1" Bcheck = Bcheck - 1 If not Bcheck < "1" then If Bcount = "6" then Sendcommand "/mode " & channel & " -bbbbbb " & Bgen & "",ServerNumber Bgen = "" Bcount = "0" End If If Lcase(GetIniFile("" & channel & ".txt","Blist",Bcheck,"")) = Lcase(Bmsg) then Bgen= Bgen + "*" & GetIniFile("" & channel & ".txt","Blist",Bcheck,"") & "* " Bcount = Bcount -- 1 Writeinifile"" & channel & ".txt","Blist",Bcheck,"" Writeinifile"" & channel & ".txt","Blist","" & Bcheck & "i","" Bfound = "1" ElseIf InStr(Lcase(Bmsg),Lcase(GetIniFile("" & channel & ".txt","Blist",Bcheck,""))) and not GetIniFile("" & channel & ".txt","Blist",Bcheck,"") = "" then Ntc Nickname, "Shorter ban found on ban line: " & Bcheck & "",ServerNumber ElseIf InStr(Lcase(GetIniFile("" & channel & ".txt","Blist",Bcheck,"")),Lcase(Bmsg)) then Bgen= Bgen + "*" & GetIniFile("" & channel & ".txt","Blist",Bcheck,"") & "* " Bcount = Bcount -- 1 Writeinifile"" & channel & ".txt","Blist",Bcheck,"" Writeinifile"" & channel & ".txt","Blist","" & Bcheck & "i","" Bfound = "1" End If Else If Bfound="1" then If not Bgen = "" then Sendcommand "/mode " & channel & " -bbbbbb " & Bgen & "",ServerNumber End If Ntc Nickname, "Removed ban(s)",ServerNumber Else Ntc Nickname, "No bans were removed matching your criteria",ServerNumber End If End If Loop End If End If Case "banlist" If not GetIniFile("" & channel & ".txt",Getidentifier("$mask(" & Nickname & "!" & Host & ",2)"),"Host","") = "" and GetIniFile("" & channel & ".txt","DCC","Allowed","")>"2" then If not Mid(Message,Len(words(0)) -- 2)="" then If GetIniFile("" & channel & ".txt","Blist",words(1),"") = "" and not Len(words(1)) > 9 then Ntc Nickname, "Error: Invalid number/Host input is too short!",ServerNumber Elseif Len(words(1)) > 9 then Sendcommand "/! Banlist " & Nickname & "|" & channel & "|" & ServerNumber & "|" & words(1) & "" Else Ntc Nickname, "Ban: " & GetIniFile("" & channel & ".txt","Blist",words(1),"") & " - Info/Date/Reason: " & GetIniFile("" & channel & ".txt","Blist","" & words(1) & "i","") & "",ServerNumber End if ElseIf GetIniFile("Settings.txt","Settings","Users","")="0" then Sendcommand "/! Banlist " & Nickname & "|" & channel & "|" & ServerNumber & "|2" Else Sendcommand "/! Banlist " & Nickname & "|" & channel & "|" & ServerNumber & "|1" End If ElseIf GetIniFile("" & channel & ".txt",Getidentifier("$mask(" & Nickname & "!" & Host & ",2)"),"Mod","") = "Yes" and GetIniFile("" & channel & ".txt","DCC","Allowed","")>"1" then If not Mid(Message,Len(words(0)) -- 2)="" then If GetIniFile("" & channel & ".txt","Blist",words(1),"") = "" and not Len(words(1)) > 9 then Ntc Nickname, "Error: Invalid number/Host input is too short!",ServerNumber Elseif Len(words(1)) > 9 then Sendcommand "/! Banlist " & Nickname & "|" & channel & "|" & ServerNumber & "|" & words(1) & "" Else Ntc Nickname, "Ban: " & GetIniFile("" & channel & ".txt","Blist",words(1),"") & " - Info/Date/Reason: " & GetIniFile("" & channel & ".txt","Blist","" & words(1) & "i","") & "",ServerNumber End if ElseIf GetIniFile("Settings.txt","Settings","Users","")="0" then Sendcommand "/! Banlist " & Nickname & "|" & channel & "|" & ServerNumber & "|2" Else Sendcommand "/! Banlist " & Nickname & "|" & channel & "|" & ServerNumber & "|1" End If ElseIf GetIniFile("" & channel & ".txt",Getidentifier("$mask(" & Nickname & "!" & Host & ",2)"),"Admin","") = "Yes" and GetIniFile("" & channel & ".txt","DCC","Allowed","")>"0" then If not Mid(Message,Len(words(0)) -- 2)="" then If GetIniFile("" & channel & ".txt","Blist",words(1),"") = "" and not Len(words(1)) > 9 then Ntc Nickname, "Error: Invalid number/Host input is too short!",ServerNumber Elseif Len(words(1)) > 9 then Sendcommand "/! Banlist " & Nickname & "|" & channel & "|" & ServerNumber & "|" & words(1) & "" Else Ntc Nickname, "Ban: " & GetIniFile("" & channel & ".txt","Blist",words(1),"") & " - Info/Date/Reason: " & GetIniFile("" & channel & ".txt","Blist","" & words(1) & "i","") & "",ServerNumber End if ElseIf GetIniFile("Settings.txt","Settings","Users","")="0" then Sendcommand "/! Banlist " & Nickname & "|" & channel & "|" & ServerNumber & "|2" Else Sendcommand "/! Banlist " & Nickname & "|" & channel & "|" & ServerNumber & "|1" End If Elseif GetIniFile("" & channel & ".txt",Getidentifier("$mask(" & Nickname & "!" & Host & ",2)"),"Protect","") = "Yes" then If not Mid(Message,Len(words(0)) -- 2)="" then If GetIniFile("" & channel & ".txt","Blist",words(1),"") = "" and not Len(words(1)) > 9 then Ntc Nickname, "Error: Invalid number/Host input is too short!",ServerNumber Elseif Len(words(1)) > 9 then Sendcommand "/! Banlist " & Nickname & "|" & channel & "|" & ServerNumber & "|" & words(1) & "" Else Ntc Nickname, "Ban: " & GetIniFile("" & channel & ".txt","Blist",words(1),"") & " - Info/Date/Reason: " & GetIniFile("" & channel & ".txt","Blist","" & words(1) & "i","") & "",ServerNumber End if ElseIf GetIniFile("Settings.txt","Settings","Users","")="0" then Sendcommand "/! Banlist " & Nickname & "|" & channel & "|" & ServerNumber & "|2" Else Sendcommand "/! Banlist " & Nickname & "|" & channel & "|" & ServerNumber & "|1" End If Else Ntc Nickname, "Error: No permission! - " & GetIniFile("" & channel & ".txt","DCC","Allowed","") & "",ServerNumber End If Case "undoban", "udb", "sorry" If getIniFile("" & channel & ".txt",Getidentifier("$mask(" & Nickname & "!" & Host & ",2)"),"Mod","")="Yes" and getIniFile("" & channel & ".txt",Getidentifier("$mask(" & Nickname & "!" & Host & ",2)"),"Protect","")="No" then If not GetIniFile("" & channel & ".txt","Lastban","Ban","")="" then If not GetIniFile("" & channel & ".txt","Lastban","Bani","")= "" then Ntc Nickname, "Error: No permission",ServerNumber Else Sendcommand "/mode " & channel & " -b *" & GetIniFile("" & channel & ".txt","Lastban","Ban","") & "*",ServerNumber Ntc Nickname, "" & GetIniFile("" & channel & ".txt","Lastban","Ban","") & " removed",ServerNumber WriteIniFile"" & channel & ".txt","Lastban","Ban","" End If Else Ntc Nickname, "Error: No recent ban!",ServerNumber End If Elseif getIniFile("" & channel & ".txt",Getidentifier("$mask(" & Nickname & "!" & Host & ",2)"),"Protect","")="Yes" then If not GetIniFile("" & channel & ".txt","Lastban","Ban","")="" then If not GetIniFile("" & channel & ".txt","Lastban","Bani","")= "" then Sendcommand "/mode " & channel & " -b *" & GetIniFile("" & channel & ".txt","Lastban","Ban","") & "*",ServerNumber Ntc Nickname, "" & GetIniFile("" & channel & ".txt","Lastban","Ban","") & " removed",ServerNumber Writeinifile"" & channel & ".txt","Blist",GetIniFile("" & channel & ".txt","Lastban","Bani",""),"" Writeinifile"" & channel & ".txt","Blist","" & GetIniFile("" & channel & ".txt","Lastban","Bani","") & "i","" WriteIniFile"" & channel & ".txt","Lastban","Ban","" WriteIniFile"" & channel & ".txt","Lastban","Bani","" Else Sendcommand "/mode " & channel & " -b *" & GetIniFile("" & channel & ".txt","Lastban","Ban","") & "*",ServerNumber Ntc Nickname, "" & GetIniFile("" & channel & ".txt","Lastban","Ban","") & " removed",ServerNumber WriteIniFile"" & channel & ".txt","Lastban","Ban","" End If Else Ntc Nickname, "Error: No recent ban!",ServerNumber End If Else Ntc Nickname, "Error: No permission",ServerNumber End If Case "suspend" If GetIniFile("" & Channel & ".txt",GetIdentifier("$mask($nick(" & Channel & "," & Nickname & ").mask,2)",ServerNumber),"Admin","") ="Yes" then If Mid(Message,10)="" then Ntc Nickname, "Error: Please state a user to suspend",ServerNumber ElseIf GetIniFile("" & Channel & ".txt",GetIdentifier("$mask($nick(" & Channel & "," & Mid(Message,10) & ").mask,2)",ServerNumber),"Nick","")="" and GetIniFile("" & Channel & ".txt",Mid(Message,10),"Host","")="" then Ntc Nickname, "User " & Mid(Message,10) & " does not exist",ServerNumber Elseif GetIniFile("" & Channel & ".txt",GetIdentifier("$mask($nick(" & Channel & "," & Mid(Message,10) & ").mask,2)",ServerNumber),"Admin","") ="Yes" and not GetIniFile("" & Channel & ".txt",GetIdentifier("$mask($nick(" & Channel & "," & Nickname & ").mask,2)",ServerNumber),"Protect","")="Yes" then Ntc Nickname, "Error: You cannot suspend other admins!",ServerNumber ElseIf GetIniFile("" & Channel & ".txt",GetIdentifier("$mask($nick(" & Channel & "," & Nickname & ").mask,2)",ServerNumber),"Special","")="S" then Ntc Nickname, "Sorry, you are restricted from using this command!",ServerNumber ElseIf GetIniFile("" & Channel & ".txt",GetIniFile("" & Channel & ".txt",Mid(Message,10),"Host",""),"Admin","")="Yes" and not GetIniFile("" & Channel & ".txt",GetIdentifier("$mask($nick(" & Channel & "," & Nickname & ").mask,2)",ServerNumber),"Protect","")="Yes" then Ntc Nickname, "Error: You cannot suspend other admins!",ServerNumber ElseIf Left(GetIniFile("" & Channel & ".txt",GetIdentifier("$mask($nick(" & Channel & "," & Mid(Message,10) & ").mask,2)",ServerNumber),"Host",""),1)="s" or Left(GetIniFile("" & Channel & ".txt",GetIniFile("" & Channel & ".txt",Mid(Message,10),"Host",""),"Host",""),1)="s" then Ntc Nickname, "Error: This user is already suspended!",ServerNumber ElseIf GetIniFile("" & Channel & ".txt",GetIdentifier("$mask($nick(" & Channel & "," & Mid(Message,10) & ").mask,2)",ServerNumber),"Protect","")="Yes" or GetIniFile("" & Channel & ".txt",GetIniFile("" & Channel & ".txt",Mid(Message,10),"Host",""),"Protect","")="Yes" then Ntc Nickname, "" & Mid(Message,10) & " is protected!",ServerNumber ElseIf not GetIniFile("" & Channel & ".txt",GetIniFile("" & Channel & ".txt",Mid(Message,10),"Host",""),"Host","")="" then Banner = GetIniFile("" & Channel & ".txt",GetIniFile("" & Channel & ".txt",Mid(Message,10),"Host",""),"Mod","") WriteIniFile"" & Channel & ".txt",GetIniFile("" & Channel & ".txt",Mid(Message,10),"Host",""),"Mod","s " & Banner & "" Banner = GetIniFile("" & Channel & ".txt",GetIniFile("" & Channel & ".txt",Mid(Message,10),"Host",""),"Admin","") WriteIniFile"" & Channel & ".txt",GetIniFile("" & Channel & ".txt",Mid(Message,10),"Host",""),"Admin","s " & Banner & "" Banner = GetIniFile("" & Channel & ".txt",GetIniFile("" & Channel & ".txt",Mid(Message,10),"Host",""),"Host","") WriteIniFile"" & Channel & ".txt",GetIniFile("" & Channel & ".txt",Mid(Message,10),"Host",""),"Host","s " & Banner & "" Ntc Nickname, "User suspended!",ServerNumber If IsOp(Mid(Message,10),Channel,ServerNumber) then sendcommand "/mode " & Channel & " -o " & Mid(Message,10) & "",ServerNumber If IsVoice(Mid(Message,10),Channel,ServerNumber) and not GetIniFile("" & channel & ".txt","av","av","")="1" then sendcommand "/mode " & Channel & " -v " & Mid(Message,10) & "",ServerNumber If not IsVoice(Mid(Message,10),Channel,ServerNumber) and GetIniFile("" & channel & ".txt","av","av","")="1" then sendcommand "/mode " & Channel & " +v " & Mid(Message,10) & "",ServerNumber Else Banner = Getinifile("" & Channel & ".txt",GetIdentifier("$mask($nick(" & Channel & "," & Mid(Message,10) & ").mask,2)",ServerNumber),"Mod","") WriteIniFile"" & Channel & ".txt",GetIdentifier("$mask($nick(" & Channel & "," & Mid(Message,10) & ").mask,2)",ServerNumber),"Mod","s " & Banner & "" Banner = Getinifile("" & Channel & ".txt",GetIdentifier("$mask($nick(" & Channel & "," & Mid(Message,10) & ").mask,2)",ServerNumber),"Admin","") WriteIniFile"" & Channel & ".txt",GetIdentifier("$mask($nick(" & Channel & "," & Mid(Message,10) & ").mask,2)",ServerNumber),"Admin","s " & Banner & "" Banner = GetIdentifier("$mask($nick(" & Channel & "," & Mid(Message,10) & ").mask,2)",ServerNumber) WriteIniFile"" & Channel & ".txt",GetIdentifier("$mask($nick(" & Channel & "," & Mid(Message,10) & ").mask,2)",ServerNumber),"Host","s " & Banner & "" Ntc Nickname, "User suspended!",ServerNumber If IsOp(Mid(Message,10),Channel,ServerNumber) then sendcommand "/mode " & Channel & " -o " & Mid(Message,10) & "",ServerNumber If IsVoice(Mid(Message,10),Channel,ServerNumber) and not GetIniFile("" & channel & ".txt","av","av","")="1" then sendcommand "/mode " & Channel & " -v " & Mid(Message,10) & "",ServerNumber If not IsVoice(Mid(Message,10),Channel,ServerNumber) and GetIniFile("" & channel & ".txt","av","av","")="1" then sendcommand "/mode " & Channel & " +v " & Mid(Message,10) & "",ServerNumber End If Else Ntc Nickname, "Error: Not a channel admin!",ServerNumber End If Case "unsuspend" If GetIniFile("" & Channel & ".txt",GetIdentifier("$mask($nick(" & Channel & "," & Nickname & ").mask,2)",ServerNumber),"Admin","") ="Yes" then If Mid(Message,12)="" then Ntc Nickname, "Error: Please state a user to unsuspend",ServerNumber ElseIf GetIniFile("" & Channel & ".txt",GetIdentifier("$mask($nick(" & Channel & "," & Mid(Message,12) & ").mask,2)",ServerNumber),"Nick","")="" and GetIniFile("" & Channel & ".txt",Mid(Message,12),"Host","")="" then Ntc Nickname, "User " & Mid(Message,12) & " does not exist",ServerNumber ElseIf GetIniFile("" & Channel & ".txt",GetIdentifier("$mask($nick(" & Channel & "," & Nickname & ").mask,2)",ServerNumber),"Special","")="S" then Ntc Nickname, "Sorry, you are restricted from using this command!",ServerNumber Elseif GetIniFile("" & Channel & ".txt",GetIdentifier("$mask($nick(" & Channel & "," & Mid(Message,12) & ").mask,2)",ServerNumber),"Admin","") ="Yes" and not GetIniFile("" & Channel & ".txt",GetIdentifier("$mask($nick(" & Channel & "," & Nickname & ").mask,2)",ServerNumber),"Protect","")="Yes" then Ntc Nickname, "Error: You cannot unsuspend other admins!",ServerNumber ElseIf GetIniFile("" & Channel & ".txt",GetIniFile("" & Channel & ".txt",Mid(Message,12),"Host",""),"Admin","")="Yes" and not GetIniFile("" & Channel & ".txt",GetIdentifier("$mask($nick(" & Channel & "," & Nickname & ").mask,2)",ServerNumber),"Protect","")="Yes" then Ntc Nickname, "Error: You cannot unsuspend other admins!",ServerNumber ElseIf not Left(GetIniFile("" & Channel & ".txt",GetIdentifier("$mask($nick(" & Channel & "," & Mid(Message,12) & ").mask,2)",ServerNumber),"Host",""),1)="s" and not Left(GetIniFile("" & Channel & ".txt",GetIniFile("" & Channel & ".txt",Mid(Message,12),"Host",""),"Host",""),1)="s" then Ntc Nickname, "Error: This user is not suspended!",ServerNumber ElseIf GetIniFile("" & Channel & ".txt",GetIdentifier("$mask($nick(" & Channel & "," & Mid(Message,12) & ").mask,2)",ServerNumber),"Protect","")="Yes" or GetIniFile("" & Channel & ".txt",GetIniFile("" & Channel & ".txt",Mid(Message,12),"Host",""),"Protect","")="Yes" then Ntc Nickname, "" & Mid(Message,12) & " is protected!",ServerNumber ElseIf not GetIniFile("" & Channel & ".txt",GetIniFile("" & Channel & ".txt",Mid(Message,12),"Host",""),"Host","")="" then Banner = Mid(GetIniFile("" & Channel & ".txt",GetIniFile("" & Channel & ".txt",Mid(Message,12),"Host",""),"Mod",""),3) WriteIniFile"" & Channel & ".txt",GetIniFile("" & Channel & ".txt",Mid(Message,12),"Host",""),"Mod",Banner Banner = Mid(GetIniFile("" & Channel & ".txt",GetIniFile("" & Channel & ".txt",Mid(Message,12),"Host",""),"Admin",""),3) WriteIniFile"" & Channel & ".txt",GetIniFile("" & Channel & ".txt",Mid(Message,12),"Host",""),"Admin",Banner Banner = Mid(GetIniFile("" & Channel & ".txt",GetIniFile("" & Channel & ".txt",Mid(Message,12),"Host",""),"Host",""),3) WriteIniFile"" & Channel & ".txt",GetIniFile("" & Channel & ".txt",Mid(Message,12),"Host",""),"Host",Banner Ntc Nickname, "User unsuspended!",ServerNumber Else Banner = Mid(Getinifile("" & Channel & ".txt",GetIdentifier("$mask($nick(" & Channel & "," & Mid(Message,12) & ").mask,2)",ServerNumber),"Mod",""),3) WriteIniFile"" & Channel & ".txt",GetIdentifier("$mask($nick(" & Channel & "," & Mid(Message,12) & ").mask,2)",ServerNumber),"Mod",Banner Banner = Mid(Getinifile("" & Channel & ".txt",GetIdentifier("$mask($nick(" & Channel & "," & Mid(Message,12) & ").mask,2)",ServerNumber),"Admin",""),3) WriteIniFile"" & Channel & ".txt",GetIdentifier("$mask($nick(" & Channel & "," & Mid(Message,12) & ").mask,2)",ServerNumber),"Admin",Banner Banner = GetIdentifier("$mask($nick(" & Channel & "," & Mid(Message,12) & ").mask,2)",ServerNumber) WriteIniFile"" & Channel & ".txt",GetIdentifier("$mask($nick(" & Channel & "," & Mid(Message,12) & ").mask,2)",ServerNumber),"Host",Banner Ntc Nickname, "User unsuspended!",ServerNumber End If Else Ntc Nickname, "Error: Not a channel admin!",ServerNumber End If Case "restrict" If GetIniFile("" & Channel & ".txt",GetIdentifier("$mask($nick(" & Channel & "," & Nickname & ").mask,2)",ServerNumber),"Protect","") ="Yes" then If GetIniFile("" & Channel & ".txt",GetIdentifier("$mask($nick(" & Channel & "," & Mid(Message,11) & ").mask,2)",ServerNumber),"Host","")="" and GetIniFile("" & Channel & ".txt",Mid(Message,11),"Host","")="" then Ntc Nickname, "That user does not exist!",ServerNumber ElseIf GetIniFile("" & Channel & ".txt",GetIniFile("" & Channel & ".txt",GetIdentifier("$mask($nick(" & Channel & "," & Mid(Message,11) & ").mask,2)",ServerNumber),"Host",""),"Protect","")="Yes" or GetIniFile("" & Channel & ".txt",GetIniFile("" & Channel & ".txt",Mid(Message,11),"Host",""),"Protect","")="Yes" then Ntc Nickname, "That user is protected!",ServerNumber ElseIf GetIniFile("" & Channel & ".txt",GetIniFile("" & Channel & ".txt",GetIdentifier("$mask($nick(" & Channel & "," & Mid(Message,11) & ").mask,2)",ServerNumber),"Host",""),"Admin","")="No" or GetIniFile("" & Channel & ".txt",GetIniFile("" & Channel & ".txt",Mid(Message,11),"Host",""),"Admin","")="No" then Ntc Nickname, "Error: This command only works on admins!",ServerNumber ElseIf GetIniFile("" & Channel & ".txt",GetIniFile("" & Channel & ".txt",GetIdentifier("$mask($nick(" & Channel & "," & Mid(Message,11) & ").mask,2)",ServerNumber),"Host",""),"Special","")="S" or GetIniFile("" & Channel & ".txt",GetIniFile("" & Channel & ".txt",Mid(Message,11),"Host",""),"Special","")="S" then Ntc Nickname, "That user is already restricted!",ServerNumber ElseIf not GetIniFile("" & Channel & ".txt",GetIniFile("" & Channel & ".txt",Mid(Message,11),"Host",""),"Host","")="" then WriteIniFile"" & Channel & ".txt",GetIniFile("" & Channel & ".txt",Mid(Message,11),"Host",""),"Special","S" Ntc Nickname, "User is now on admin restrictions!",ServerNumber Else WriteIniFile"" & Channel & ".txt",GetIdentifier("$mask($nick(" & Channel & "," & Mid(Message,11) & ").mask,2)",ServerNumber),"Special","S" Ntc Nickname, "User is now on admin restrictions!",ServerNumber End If Else Ntc Nickname, "Error: Not a channel owner!",ServerNumber End If Case "unrestrict" If GetIniFile("" & Channel & ".txt",GetIdentifier("$mask($nick(" & Channel & "," & Nickname & ").mask,2)",ServerNumber),"Protect","") ="Yes" then If GetIniFile("" & Channel & ".txt",GetIdentifier("$mask($nick(" & Channel & "," & Mid(message,13) & ").mask,2)",ServerNumber),"Host","")="" and GetIniFile("" & Channel & ".txt",Mid(message,13),"Host","")="" then Ntc Nickname, "That user does not exist!",ServerNumber ElseIf GetIniFile("" & Channel & ".txt",GetIniFile("" & Channel & ".txt",GetIdentifier("$mask($nick(" & Channel & "," & Mid(message,13) & ").mask,2)",ServerNumber),"Host",""),"Protect","")="Yes" or GetIniFile("" & Channel & ".txt",GetIniFile("" & Channel & ".txt",Mid(message,13),"Host",""),"Protect","")="Yes" then Ntc Nickname, "That user is protected!",ServerNumber ElseIf GetIniFile("" & Channel & ".txt",GetIniFile("" & Channel & ".txt",GetIdentifier("$mask($nick(" & Channel & "," & Mid(message,13) & ").mask,2)",ServerNumber),"Host",""),"Special","")="" and GetIniFile("" & Channel & ".txt",GetIniFile("" & Channel & ".txt",Mid(message,13),"Host",""),"Special","")="" then Ntc Nickname, "That user is not restricted!",ServerNumber ElseIf not GetIniFile("" & Channel & ".txt",GetIniFile("" & Channel & ".txt",Mid(message,13),"Host",""),"Host","")="" then WriteIniFile"" & Channel & ".txt",GetIniFile("" & Channel & ".txt",Mid(message,13),"Host",""),"Special","" Ntc Nickname, "User is no longer on admin restrictions!",ServerNumber Else WriteIniFile"" & Channel & ".txt",GetIdentifier("$mask($nick(" & Channel & "," & Mid(message,13) & ").mask,2)",ServerNumber),"Special","" Ntc Nickname, "User is no longer on admin restrictions!",ServerNumber End If Else Ntc Nickname, "Error: Not a channel owner!",ServerNumber End If Case "greet" If GetIniFile("" & Channel & ".txt",GetIdentifier("$mask($nick(" & Channel & "," & Nickname & ").mask,2)",ServerNumber),"Mod","") ="Yes" then If GetIniFile("" & Channel & ".txt","Topic","Lock","")="On" and not GetIniFile("" & Channel & ".txt",GetIdentifier("$mask($nick(" & Channel & "," & Nickname & ").mask,2)",ServerNumber),"Admin","") ="Yes" then Ntc Nickname, "Cannot change greet! Reason: Locked by an admin",ServerNumber ElseIf Mid(Message,8)="" and Getinifile("" & Channel & ".txt","Joinmsg","Msg","")="" then Ntc Nickname, "Error: Nothing to clear",ServerNumber Elseif Lcase(Mid(Message,8))="0" and Getinifile("" & Channel & ".txt","Joinmsg","Msg","")="&" then Ntc Nickname, "Error: Greet is already off!",ServerNumber Elseif Mid(Message,8)="" then Writeinifile"" & Channel & ".txt","Joinmsg","Msg","Welcome back!" Ntc Nickname, "Default Greet message used", ServerNumber ElseIf Lcase(Mid(Message,8))="0" then Writeinifile"" & Channel & ".txt","Joinmsg","Msg","&" Ntc Nickname, "Greet message off", ServerNumber Else Writeinifile"" & Channel & ".txt","Joinmsg","Msg",Mid(Message,8) Ntc Nickname, "" & Mid(Message,8) & "", ServerNumber End if Else Ntc Nickname, "Error: Not a channel moderator!",ServerNumber End If Case "infolock" If GetIniFile("" & Channel & ".txt",GetIdentifier("$mask($nick(" & Channel & "," & Nickname & ").mask,2)",ServerNumber),"Admin","") ="Yes" then If Mid(Message,11) = "" then Ntc Nickname, "Please choose 0 to disable the lock or 1 to enable",ServerNumber ElseIf Mid(Message,11) = "0" then If GetIniFile("" & Channel & ".txt","Topic","Lock","")="Off" then Ntc Nickname, "Error: Topic and greet is already unlocked",ServerNumber Else WriteIniFile"" & Channel & ".txt","Topic","Lock","Off" Ntc Nickname, "Info is now free to edit!",ServerNumber End If ElseIf Mid(Message,11) = "1" then If GetIniFile("" & Channel & ".txt","Topic","Lock","")="On" then Ntc Nickname, "Error: Topic and greet is already locked",ServerNumber Else WriteIniFile"" & Channel & ".txt","Topic","Lock","On" Ntc Nickname, "Info is now locked to editors!",ServerNumber End If End If Else Ntc Nickname, "Error: Not a channel admin",ServerNumber End If Case "dtopic" If GetIniFile("" & Channel & ".txt",GetIdentifier("$mask($nick(" & Channel & "," & Nickname & ").mask,2)",ServerNumber),"Protect","") ="Yes" then If Mid(Message,9)="" then If Getinifile("" & Channel & ".txt","Topic","Ident","")="" then Ntc Nickname, "Error: Nothing to clear!",ServerNumber Else SendCommand "/topic " & channel & " Welcome to " & Channel & " || " & Getinifile("" & Channel & ".txt","Topic","Topic","") & "",ServerNumber Writeinifile"" & Channel & ".txt","Topic","Ident","Welcome to " & Channel & " ||" Ntc Nickname, "Default topic ident used!",ServerNumber End If ElseIf not Mid(Message,9)="" then If Getinifile("" & Channel & ".txt","Topic","Ident","")= Mid(Message,9) then Ntc Nickname, "Error: You are using the same default! Try &Trefresh to resolve any errors.",ServerNumber Else SendCommand "/topic " & channel & " " & Mid(Message,9) & " " & Getinifile("" & Channel & ".txt","Topic","Topic","") & "",ServerNumber Writeinifile"" & Channel & ".txt","Topic","Ident",Mid(Message,9) End If End if Else Ntc Nickname, "Error: Not a channel owner!",ServerNumber End If Case "clearinfo" If GetIniFile("" & Channel & ".txt",GetIdentifier("$mask($nick(" & Channel & "," & Nickname & ").mask,2)",ServerNumber),"Admin","") ="Yes" then If Mid(Message,12)="" then Ntc Nickname, "Error: Please state a user to clear info",ServerNumber ElseIf GetIniFile("" & Channel & ".txt",GetIdentifier("$mask($nick(" & Channel & "," & Mid(Message,12) & ").mask,2)",ServerNumber),"Host","")="" and GetIniFile("" & Channel & ".txt",Mid(Message,12),"Host","")="" then Ntc Nickname, "That user does not exist!",ServerNumber ElseIf GetIniFile("" & Channel & ".txt",GetIniFile("" & Channel & ".txt",GetIdentifier("$mask($nick(" & Channel & "," & Mid(Message,12) & ").mask,2)",ServerNumber),"Host",""),"Protect","")="Yes" or GetIniFile("" & Channel & ".txt",GetIniFile("" & Channel & ".txt",Mid(Message,12),"Host",""),"Protect","")="Yes" then Ntc Nickname, "That user is protected!",ServerNumber ElseIf GetIniFile("" & Channel & ".txt",GetIniFile("" & Channel & ".txt",GetIdentifier("$mask($nick(" & Channel & "," & Mid(Message,12) & ").mask,2)",ServerNumber),"Host",""),"Join","")="" and GetIniFile("" & Channel & ".txt",GetIniFile("" & Channel & ".txt",Mid(Message,12),"Host",""),"Join","")="" then Ntc Nickname, "That user has no info to clear!",ServerNumber ElseIf Left(GetIniFile("" & Channel & ".txt",GetIniFile("" & Channel & ".txt",GetIdentifier("$mask($nick(" & Channel & "," & Mid(Message,12) & ").mask,2)",ServerNumber),"Host",""),"Join",""),1)="&" or Left(GetIniFile("" & Channel & ".txt",GetIniFile("" & Channel & ".txt",Mid(Message,12),"Host",""),"Join",""),1)="&" then Ntc Nickname, "Error: An admin has already cleared this user's info!",ServerNumber ElseIf not GetIniFile("" & Channel & ".txt",GetIniFile("" & Channel & ".txt",Mid(Message,12),"Host",""),"Join","")="" then WriteIniFile"" & Channel & ".txt",GetIniFile("" & Channel & ".txt",Mid(Message,12),"Host",""),"Join","& " & GetIniFile("" & Channel & ".txt",GetIdentifier("$mask($nick(" & Channel & "," & Nickname & ").mask,2)",ServerNumber),"Nick","") & "" Ntc Nickname, "Info cleared!",ServerNumber Else WriteIniFile"" & Channel & ".txt",GetIdentifier("$mask($nick(" & Channel & "," & Mid(Message,12) & ").mask,2)",ServerNumber),"Join","& " & GetIniFile("" & Channel & ".txt",GetIdentifier("$mask($nick(" & Channel & "," & Nickname & ").mask,2)",ServerNumber),"Nick","") & "" Ntc Nickname, "Info cleared!",ServerNumber End If Else Ntc Nickname, "Error: Not a channel admin!",ServerNumber End If Case "op" If Mid(Message,5)="" then exit sub oword = Split(Mid(Message,5) + " s"," ") ovoc = "0" Thumb = "" othumb = "" If Lcase(mid(Message,5))="0" then If getinifile("" & channel & ".txt",Getidentifier("$mask(" & Nickname & "!" & Host & ",2)"),"Op","")="Off" then Ntc Nickname, "Error: You already disabled automatic op for yourself!",ServerNumber Else writeinifile"" & channel & ".txt",Getidentifier("$mask(" & Nickname & "!" & Host & ",2)"),"Op","Off" Ntc Nickname, "Auto op now off",ServerNumber End If ElseIf Lcase(mid(Message,5))="1" then If getinifile("" & channel & ".txt",Getidentifier("$mask(" & Nickname & "!" & Host & ",2)"),"Op","")="" then Ntc Nickname, "Error: You already enabled automatic op for yourself!",ServerNumber Else writeinifile"" & channel & ".txt",Getidentifier("$mask(" & Nickname & "!" & Host & ",2)"),"Op","" Ntc Nickname, "Auto op now on (If applicable)",ServerNumber End If ElseIf GetIniFile("" & channel & ".txt",Getidentifier("$mask(" & Nickname & "!" & Host & ",2)"),"Protect","") ="Yes" then Do while not ovoc > "7" If oword(ovoc) = "s" or ovoc = "7" then If not othumb = "" then SendCommand "/mode " & channel & " +oooooo " & othumb & "",ServerNumber End If If Not Thumb = "" then Ntc Nickname, "Already opped users: " & Thumb & "",ServerNumber End If ovoc = "7" ElseIf IsOp(oword(ovoc),channel,ServerNumber) and not GetIdentifier("$mask($nick(" & channel & "," & oword(ovoc) & ").mask,2)",ServerNumber)="$null" then Thumb = Thumb + " " & oword(ovoc) & "" Elseif not GetIdentifier("$mask($nick(" & channel & "," & oword(ovoc) & ").mask,2)",ServerNumber)="$null" then othumb = othumb + " " & oword(ovoc) & "" End If ovoc = ovoc -- 1 Loop ElseIf GetIniFile("" & channel & ".txt",Getidentifier("$mask(" & Nickname & "!" & Host & ",2)"),"Admin","") ="Yes" and not GetIniFile("" & channel & ".txt","op","Set","")="0" then Do while not ovoc > "7" If oword(ovoc) = "s" or ovoc = "7" then If not othumb = "" then SendCommand "/mode " & channel & " +oooooo " & othumb & "",ServerNumber End If If Not Thumb = "" then Ntc Nickname, "Already opped users: " & Thumb & "",ServerNumber End If ovoc = "7" ElseIf IsOp(oword(ovoc),channel,ServerNumber) and not GetIdentifier("$mask($nick(" & channel & "," & oword(ovoc) & ").mask,2)",ServerNumber)="$null" then Thumb = Thumb + " " & oword(ovoc) & "" Elseif not GetIdentifier("$mask($nick(" & channel & "," & oword(ovoc) & ").mask,2)",ServerNumber)="$null" then othumb = othumb + " " & oword(ovoc) & "" End If ovoc = ovoc -- 1 Loop Else Ntc Nickname, "Error: No permission!",Servernumber End If Case "deop" If Mid(Message,7)="" then exit sub Oword = Split(Mid(Message,Len(words(0)) -- 2) + " s"," ") Ovoc = "0" Thumb = "" Othumb = "" OPthumb = "" If GetIniFile("" & channel & ".txt",Getidentifier("$mask(" & Nickname & "!" & Host & ",2)"),"Protect","") ="Yes" then Do while not Ovoc > "7" If Oword(Ovoc) = "s" or Ovoc = "7" then If not Othumb = "" then SendCommand "/mode " & channel & " -oooooo " & Othumb & "",ServerNumber End If If Not Thumb = "" and not OPthumb="" then Ntc Nickname, "Already deopped users: " & Thumb & " - You cannot deop these users: " & OPthumb & "",ServerNumber Else If not OPthumb = "" then Ntc Nickname, "You cannot deop these users: " & OPthumb & "",ServerNumber End If If Not Thumb = "" then Ntc Nickname, "Already deopped users: " & Thumb & "",ServerNumber End If End If Ovoc = "7" ElseIf not IsOp(Oword(Ovoc),channel,ServerNumber) and not GetIdentifier("$mask($nick(" & channel & "," & Oword(Ovoc) & ").mask,2)",ServerNumber)="$null" then Thumb = Thumb + " " & Oword(Ovoc) & "" Elseif GetIniFile("" & channel & ".txt",GetIdentifier("$mask($nick(" & channel & "," & Oword(Ovoc) & ").mask,2)",ServerNumber),"Protect","")="Yes" and not GetIniFile("" & channel & ".txt",GetIdentifier("$mask($nick(" & channel & "," & Oword(Ovoc) & ").mask,2)",ServerNumber),"Host","")=Getidentifier("$mask(" & Nickname & "!" & Host & ",2)") then OPthumb = OPthumb + " " & Oword(Ovoc) & "" Elseif not GetIdentifier("$mask($nick(" & channel & "," & Oword(Ovoc) & ").mask,2)",ServerNumber)="$null" then Othumb = Othumb + " " & Oword(Ovoc) & "" End If Ovoc = Ovoc -- 1 Loop ElseIf GetIniFile("" & channel & ".txt",Getidentifier("$mask(" & Nickname & "!" & Host & ",2)"),"Admin","") ="Yes" and not GetIniFile("" & channel & ".txt","op","Set","")="0" then Do while not Ovoc > "7" If Oword(Ovoc) = "s" or Ovoc = "7" then If not Othumb = "" then SendCommand "/mode " & channel & " -oooooo " & Othumb & "",ServerNumber End If If Not Thumb = "" and not OPthumb="" then Ntc Nickname, "Already deopped users: " & Thumb & " - You cannot deop these users: " & OPthumb & "",ServerNumber Else If not OPthumb = "" then Ntc Nickname, "You cannot deop these users: " & OPthumb & "",ServerNumber End If If Not Thumb = "" then Ntc Nickname, "Already deopped users: " & Thumb & "",ServerNumber End If End If Ovoc = "7" ElseIf not IsOp(Oword(Ovoc),channel,ServerNumber) and not GetIdentifier("$mask($nick(" & channel & "," & Oword(Ovoc) & ").mask,2)",ServerNumber)="$null" then Thumb = Thumb + " " & Oword(Ovoc) & "" Elseif GetIniFile("" & channel & ".txt",GetIdentifier("$mask($nick(" & channel & "," & Oword(Ovoc) & ").mask,2)",ServerNumber),"Admin","")="Yes" and not GetIniFile("" & channel & ".txt",GetIdentifier("$mask($nick(" & channel & "," & Oword(Ovoc) & ").mask,2)",ServerNumber),"Host","")=Getidentifier("$mask(" & Nickname & "!" & Host & ",2)") then OPthumb = OPthumb + " " & Oword(Ovoc) & "" Elseif not GetIdentifier("$mask($nick(" & channel & "," & Oword(Ovoc) & ").mask,2)",ServerNumber)="$null" then Othumb = Othumb + " " & Oword(Ovoc) & "" End If Ovoc = Ovoc -- 1 Loop Else Ntc Nickname, "Error: No permission!",Servernumber End If Case "voice", "v" If GetIniFile("" & Channel & ".txt",Getidentifier("$mask(" & Nickname & "!" & Host & ",2)"),"Mod","") ="Yes" or IsOp(Nickname,Channel,ServerNumber) then Vword = Split(Mid(Message,Len(Words(0)) -- 2) + " s"," ") Lvoc = "0" Thumb = "" Vthumb = "" Do while not Lvoc > "7" If Vword(Lvoc) = "s" or Lvoc = "7" then If not Vthumb = "" then SendCommand "/mode " & Channel & " +vvvvvv " & Vthumb & "",ServerNumber End If If Not Thumb = "" then Ntc Nickname, "Already voiced users: " & Thumb & "",ServerNumber End If Lvoc = "7" ElseIf IsVoice(Vword(Lvoc),channel,ServerNumber) and not GetIdentifier("$mask($nick(" & Channel & "," & Vword(Lvoc) & ").mask,2)",ServerNumber)="$null" then Thumb = Thumb + " " & Vword(Lvoc) & "" Elseif not GetIdentifier("$mask($nick(" & Channel & "," & Vword(Lvoc) & ").mask,2)",ServerNumber)="$null" then Vthumb = Vthumb + " " & Vword(Lvoc) & "" End If Lvoc = Lvoc -- 1 Loop Else Ntc Nickname, "Error: Not a channel moderator!",ServerNumber End If Case "devoice", "dv" If GetIniFile("" & Channel & ".txt",Getidentifier("$mask(" & Nickname & "!" & Host & ",2)"),"Mod","") ="Yes" or IsOp(Nickname,Channel,ServerNumber) then Vword = Split(Mid(Message,Len(Words(0)) -- 2) + " s"," ") Lvoc = "0" Thumb = "" Vthumb = "" VPthumb = "" Do while not Lvoc > "7" If Vword(Lvoc) = "s" or Lvoc = "7" then If not Vthumb = "" then SendCommand "/mode " & Channel & " -vvvvvv " & Vthumb & "",ServerNumber End If If Not Thumb = "" and not VPthumb = "" then Ntc Nickname, "Already devoiced users: " & Thumb & " - You cannot devoice these users: " & VPthumb & "",ServerNumber Else If Not Thumb = "" then Ntc Nickname, "Already devoiced users: " & Thumb & "",ServerNumber End If If not VPthumb = "" then Ntc Nickname, "You cannot devoice these users: " & VPthumb & "",ServerNumber End If End If Lvoc = "7" ElseIf not IsVoice(Vword(Lvoc),channel,ServerNumber) and not GetIdentifier("$mask($nick(" & Channel & "," & Vword(Lvoc) & ").mask,2)",ServerNumber)="$null" then Thumb = Thumb + " " & Vword(Lvoc) & "" Elseif GetIniFile("" & Channel & ".txt",GetIdentifier("$mask($nick(" & Channel & "," & Vword(Lvoc) & ").mask,2)",ServerNumber),"Protect","")="Yes" then VPthumb = VPthumb + " " & Vword(Lvoc) & "" Elseif not GetIdentifier("$mask($nick(" & Channel & "," & Vword(Lvoc) & ").mask,2)",ServerNumber)="$null" then Vthumb = Vthumb + " " & Vword(Lvoc) & "" End If Lvoc = Lvoc -- 1 Loop Else Ntc Nickname, "Error: Not a channel moderator!",ServerNumber End If Case "moderate" If GetIniFile("" & Channel & ".txt",GetIdentifier("$mask($nick(" & Channel & "," & Nickname & ").mask,2)",ServerNumber),"Admin","") ="Yes" then If Mid(Message,11)="" then Ntc Nickname, "Error: Please state a user to moderate",ServerNumber ElseIf GetIniFile("" & Channel & ".txt",GetIdentifier("$mask($nick(" & Channel & "," & Mid(Message,11) & ").mask,2)",ServerNumber),"Nick","")="" and GetIniFile("" & Channel & ".txt",Mid(Message,11),"Host","")="" then Ntc Nickname, "User " & Mid(Message,11) & " does not exist",ServerNumber ElseIf GetIniFile("" & Channel & ".txt",GetIdentifier("$mask($nick(" & Channel & "," & Mid(Message,11) & ").mask,2)",ServerNumber),"Mod","")="Yes" or GetIniFile("" & Channel & ".txt",GetIniFile("" & Channel & ".txt",Mid(Message,11),"Host",""),"Mod","")="Yes" then Ntc Nickname, "" & Mid(Message,11) & " Already has moderation",ServerNumber ElseIf GetIniFile("" & Channel & ".txt",GetIdentifier("$mask($nick(" & Channel & "," & Nickname & ").mask,2)",ServerNumber),"Special","")="S" then Ntc Nickname, "Sorry, you are restricted from using this command!",ServerNumber ElseIf Left(GetIniFile("" & Channel & ".txt",GetIdentifier("$mask($nick(" & Channel & "," & Mid(Message,11) & ").mask,2)",ServerNumber),"Host",""),1)="s" or Left(GetIniFile("" & Channel & ".txt",GetIniFile("" & Channel & ".txt",Mid(Message,11),"Host",""),"Host",""),1)="s" then Ntc Nickname, "" & Mid(Message,11) & " is suspended!",ServerNumber ElseIf not GetIniFile("" & Channel & ".txt",GetIdentifier("$mask($nick(" & Channel & "," & Mid(Message,11) & ").mask,2)",ServerNumber),"Host","")="" then WriteIniFile"" & Channel & ".txt",GetIdentifier("$mask($nick(" & Channel & "," & Mid(Message,11) & ").mask,2)",ServerNumber),"Mod","Yes" Ntc Nickname, "" & Mid(Message,11) & " is now a moderator",ServerNumber If GetIniFile("" & Channel & ".txt","op","Set","")="2" then SendCommand "/mode " & Channel & " +o " & Mid(Message,11) & "",ServerNumber End If Else WriteIniFile"" & Channel & ".txt",GetIniFile("" & Channel & ".txt",Mid(Message,11),"Host",""),"Mod","Yes" Ntc Nickname, "" & Mid(Message,11) & " is now a moderator",ServerNumber End If Else Ntc Nickname, "Error: Not a channel admin!",ServerNumber End If Case "demoderate" If GetIniFile("" & Channel & ".txt",GetIdentifier("$mask($nick(" & Channel & "," & Nickname & ").mask,2)",ServerNumber),"Admin","") ="Yes" then If Mid(Message,13)="" then Ntc Nickname, "Error: Please state a user to demoderate",ServerNumber ElseIf GetIniFile("" & Channel & ".txt",GetIdentifier("$mask($nick(" & Channel & "," & Mid(Message,13) & ").mask,2)",ServerNumber),"Nick","")="" and GetIniFile("" & Channel & ".txt",Mid(Message,13),"Host","")="" then Ntc Nickname, "User " & Mid(Message,13) & " does not exist",ServerNumber ElseIf GetIniFile("" & Channel & ".txt",GetIdentifier("$mask($nick(" & Channel & "," & Mid(Message,13) & ").mask,2)",ServerNumber),"Protect","")="Yes" or GetIniFile("" & Channel & ".txt",GetIniFile("" & Channel & ".txt",Mid(Message,13),"Host",""),"Protect","")="Yes" then Ntc Nickname, "" & Mid(Message,13) & " is protected!",ServerNumber ElseIf GetIniFile("" & Channel & ".txt",GetIdentifier("$mask($nick(" & Channel & "," & Nickname & ").mask,2)",ServerNumber),"Special","")="S" then Ntc Nickname, "Sorry, you are restricted from using this command!",ServerNumber ElseIf GetIniFile("" & Channel & ".txt",GetIdentifier("$mask($nick(" & Channel & "," & Mid(Message,13) & ").mask,2)",ServerNumber),"Mod","")="No" or GetIniFile("" & Channel & ".txt",GetIniFile("" & Channel & ".txt",Mid(Message,13),"Host",""),"Mod","")="No" then Ntc Nickname, "" & Mid(Message,13) & " is not a moderator",ServerNumber ElseIf GetIniFile("" & Channel & ".txt",GetIdentifier("$mask($nick(" & Channel & "," & Mid(Message,13) & ").mask,2)",ServerNumber),"Admin","")="Yes" or GetIniFile("" & Channel & ".txt",GetIniFile("" & Channel & ".txt",Mid(Message,13),"Host",""),"Admin","")="Yes" then If GetIniFile("" & Channel & ".txt",GetIdentifier("$mask($nick(" & Channel & "," & Nickname & ").mask,2)",ServerNumber),"Protect","")="Yes" then If not GetIniFile("" & Channel & ".txt",GetIdentifier("$mask($nick(" & Channel & "," & Mid(Message,13) & ").mask,2)",ServerNumber),"Host","")="" then WriteIniFile"" & Channel & ".txt",GetIdentifier("$mask($nick(" & Channel & "," & Mid(Message,13) & ").mask,2)",ServerNumber),"Mod","No" WriteIniFile"" & Channel & ".txt",GetIdentifier("$mask($nick(" & Channel & "," & Mid(Message,13) & ").mask,2)",ServerNumber),"Admin","No" Ntc Nickname, "" & Mid(Message,13) & " is no longer a moderator or admin",ServerNumber SendCommand "/mode " & Channel & " -o " & Mid(Message,13) & "",ServerNumber SendCommand "/mode " & Channel & " +v " & Mid(Message,13) & "",ServerNumber Else WriteIniFile"" & Channel & ".txt",GetIniFile("" & Channel & ".txt",Mid(Message,13),"Host",""),"Mod","No" WriteIniFile"" & Channel & ".txt",GetIniFile("" & Channel & ".txt",Mid(Message,13),"Host",""),"Admin","No" Ntc Nickname, "" & Mid(Message,13) & " is no longer a moderator or admin",ServerNumber End If Else Ntc Nickname, "Error: You cannot delete this admin!",ServerNumber End If ElseIf not GetIniFile("" & Channel & ".txt",GetIdentifier("$mask($nick(" & Channel & "," & Mid(Message,13) & ").mask,2)",ServerNumber),"Host","")="" then WriteIniFile"" & Channel & ".txt",GetIdentifier("$mask($nick(" & Channel & "," & Mid(Message,13) & ").mask,2)",ServerNumber),"Mod","No" Ntc Nickname, "" & Mid(Message,13) & " is no longer a moderator",ServerNumber SendCommand "/mode " & Channel & " -o " & Mid(Message,13) & "",ServerNumber SendCommand "/mode " & Channel & " +v " & Mid(Message,13) & "",ServerNumber Else WriteIniFile"" & Channel & ".txt",GetIniFile("" & Channel & ".txt",Mid(Message,13),"Host",""),"Mod","No" Ntc Nickname, "" & Mid(Message,13) & " is no longer a moderator",ServerNumber End If Else Ntc Nickname, "Error: Not a channel admin!",ServerNumber End if Case "admin" If GetIniFile("" & Channel & ".txt",GetIdentifier("$mask($nick(" & Channel & "," & Nickname & ").mask,2)",ServerNumber),"Protect","") ="Yes" then If Mid(Message,8)="" then Ntc Nickname, "Error: Please state a user to admin",ServerNumber ElseIf GetIniFile("" & Channel & ".txt",GetIdentifier("$mask($nick(" & Channel & "," & Mid(Message,8) & ").mask,2)",ServerNumber),"Nick","")="" and GetIniFile("" & Channel & ".txt",Mid(Message,8),"Host","")="" then Ntc Nickname, "User " & Mid(Message,8) & " does not exist",ServerNumber ElseIf GetIniFile("" & Channel & ".txt",GetIdentifier("$mask($nick(" & Channel & "," & Mid(Message,8) & ").mask,2)",ServerNumber),"Admin","")="Yes" or GetIniFile("" & Channel & ".txt",GetIniFile("" & Channel & ".txt",Mid(Message,8),"Host",""),"Admin","")="Yes" then Ntc Nickname, "" & Mid(Message,8) & " Already has admin",ServerNumber ElseIf Left(GetIniFile("" & Channel & ".txt",GetIdentifier("$mask($nick(" & Channel & "," & Mid(Message,8) & ").mask,2)",ServerNumber),"Host",""),1)="s" or Left(GetIniFile("" & Channel & ".txt",GetIniFile("" & Channel & ".txt",Mid(Message,8),"Host",""),"Host",""),1)="s" then Ntc Nickname, "" & Mid(Message,8) & " is suspended!",ServerNumber ElseIf not GetIniFile("" & Channel & ".txt",GetIdentifier("$mask($nick(" & Channel & "," & Mid(Message,8) & ").mask,2)",ServerNumber),"Host","")="" then If GetIniFile("" & Channel & ".txt",GetIdentifier("$mask($nick(" & Channel & "," & Mid(Message,8) & ").mask,2)",ServerNumber),"Mod","")="No" then WriteIniFile"" & Channel & ".txt",GetIdentifier("$mask($nick(" & Channel & "," & Mid(Message,8) & ").mask,2)",ServerNumber),"Mod","Yes" End If WriteIniFile"" & Channel & ".txt",GetIdentifier("$mask($nick(" & Channel & "," & Mid(Message,8) & ").mask,2)",ServerNumber),"Admin","Yes" If not GetIniFile("" & Channel & ".txt","op","Set","")="0" then SendCommand "/mode " & Channel & " +o " & Mid(Message,8) & "",ServerNumber End If Ntc Nickname, "" & Mid(Message,8) & " Now has admin",ServerNumber Else If GetIniFile("" & Channel & ".txt",GetIniFile("" & Channel & ".txt",Mid(Message,8),"Host",""),"Mod","")="No" then WriteIniFile"" & Channel & ".txt",GetIniFile("" & Channel & ".txt",Mid(Message,8),"Host",""),"Mod","Yes" End If WriteIniFile"" & Channel & ".txt",GetIniFile("" & Channel & ".txt",Mid(Message,8),"Host",""),"Admin","Yes" If not GetIniFile("" & Channel & ".txt","op","Set","")="0" then SendCommand "/mode " & Channel & " +o " & Mid(Message,8) & "",ServerNumber End If Ntc Nickname, "" & Mid(Message,8) & " Now has admin",ServerNumber End If Else Ntc Nickname, "Error: Not a channel owner!",ServerNumber End If Case "deadmin" If GetIniFile("" & Channel & ".txt",GetIdentifier("$mask($nick(" & Channel & "," & Nickname & ").mask,2)",ServerNumber),"Protect","") ="Yes" then If Mid(Message,10)="" then Ntc Nickname, "Error: Please state a user to deadmin",ServerNumber ElseIf GetIniFile("" & Channel & ".txt",GetIdentifier("$mask($nick(" & Channel & "," & Mid(Message,10) & ").mask,2)",ServerNumber),"Nick","")="" and GetIniFile("" & Channel & ".txt",Mid(Message,10),"Host","")="" then Ntc Nickname, "User " & Mid(Message,10) & " does not exist",ServerNumber ElseIf GetIniFile("" & Channel & ".txt",GetIdentifier("$mask($nick(" & Channel & "," & Mid(Message,10) & ").mask,2)",ServerNumber),"Protect","")="Yes" or GetIniFile("" & Channel & ".txt",GetIniFile("" & Channel & ".txt",Mid(Message,10),"Host",""),"Protect","")="Yes" then Ntc Nickname, "" & Mid(Message,10) & " is protected!",ServerNumber ElseIf GetIniFile("" & Channel & ".txt",GetIdentifier("$mask($nick(" & Channel & "," & Mid(Message,10) & ").mask,2)",ServerNumber),"Admin","")="No" or GetIniFile("" & Channel & ".txt",GetIniFile("" & Channel & ".txt",Mid(Message,10),"Host",""),"Admin","")="No" then Ntc Nickname, "" & Mid(Message,10) & " Does not have admin",ServerNumber ElseIf not GetIniFile("" & Channel & ".txt",GetIdentifier("$mask($nick(" & Channel & "," & Mid(Message,10) & ").mask,2)",ServerNumber),"Host","")="" then WriteIniFile"" & Channel & ".txt",GetIdentifier("$mask($nick(" & Channel & "," & Mid(Message,10) & ").mask,2)",ServerNumber),"Admin","No" WriteIniFile"" & Channel & ".txt",GetIdentifier("$mask($nick(" & Channel & "," & Mid(Message,10) & ").mask,2)",ServerNumber),"Special","" If not GetIniFile("" & Channel & ".txt","op","Set","")="2" then SendCommand "/mode " & Channel & " -o " & Mid(Message,10) & "",ServerNumber End if SendCommand "/mode " & Channel & " +v " & Mid(Message,10) & "",ServerNumber Ntc Nickname, "" & Mid(Message,10) & " No longer has admin",ServerNumber Else WriteIniFile"" & Channel & ".txt",GetIniFile("" & Channel & ".txt",Mid(Message,10),"Host",""),"Admin","No" WriteIniFile"" & Channel & ".txt",GetIniFile("" & Channel & ".txt",Mid(Message,10),"Host",""),"Special","" Ntc Nickname, "" & Mid(Message,10) & " No longer has admin",ServerNumber End If Else Ntc Nickname, "Error: Not a channel owner!",ServerNumber End if Case "setop" If GetIniFile("" & Channel & ".txt",GetIdentifier("$mask($nick(" & Channel & "," & Nickname & ").mask,2)",ServerNumber),"Protect","") ="Yes" then If Lcase(Mid(Message,8))="0" then If GetIniFile("" & Channel & ".txt","op","Set","")="0" then Ntc Nickname, "Error: Auto op is already set to owner only!",ServerNumber Else writeIniFile"" & Channel & ".txt","op","Set","0" Ntc Nickname, "Only channel owner will now get op",ServerNumber End If ElseIf Lcase(Mid(Message,8))="1" then If GetIniFile("" & Channel & ".txt","op","Set","")="1" then Ntc Nickname, "Error: Auto op is already set to admins and higher!",ServerNumber Else writeIniFile"" & Channel & ".txt","op","Set","1" Ntc Nickname, "Only channel admins and higher will now get op",ServerNumber End If ElseIf Lcase(Mid(Message,8))="2" then If GetIniFile("" & Channel & ".txt","op","Set","")="2" then Ntc Nickname, "Error: Auto op is already set to moderators and higher!",ServerNumber Else writeIniFile"" & Channel & ".txt","op","Set","2" Ntc Nickname, "Warning: Only channel moderators and higher will now get op (Not recommended)",ServerNumber End If ElseIf Mid(Message,8)="" then Ntc Nickname, "Error: Please enter/set this mode to either 0,1,2 following the command!",ServerNumber Else Ntc Nickname, "Error: Please set this mode to either 0,1,2!",ServerNumber End If Else Ntc Nickname, "Error: Not a channel owner!",ServerNumber End If Case "checkop" If GetIniFile("" & Channel & ".txt",GetIdentifier("$mask($nick(" & Channel & "," & Nickname & ").mask,2)",ServerNumber),"Protect","") ="Yes" then If Mid(Message,10) = "" then Ntc Nickname, "Please choose 0 to disable or 1 to enable",ServerNumber ElseIf Mid(Message,10) = "1" then If Getinifile("" & Channel & ".txt","Modecheck","Enable","")="On" then Ntc Nickname, "Error: Op checking is already enabled",ServerNumber Else WriteIniFile"" & Channel & ".txt","Modecheck","Enable","On" Ntc Nickname, "Op checking is now enabled",ServerNumber End If ElseIf Mid(Message,10) = "0" then If Getinifile("" & Channel & ".txt","Modecheck","Enable","")="Off" then Ntc Nickname, "Error: Op checking is already disabled",ServerNumber Else WriteIniFile"" & Channel & ".txt","Modecheck","Enable","Off" Ntc Nickname, "Op checking is now disabled",ServerNumber End If End If Else Ntc Nickname, "Error: Not a channel owner",ServerNumber End If Case "deluser" If GetIniFile("" & Channel & ".txt",GetIdentifier("$mask($nick(" & Channel & "," & Nickname & ").mask,2)",ServerNumber),"Admin","") ="Yes" then If Mid(Message,10)="" then Ntc Nickname, "Error: Please state a host or nickname to delete!",ServerNumber ElseIf Left(words(1),3)="*!*" then If GetIniFile("" & Channel & ".txt",words(1),"Admin","")="" then Ntc Nickname, "Host " & words(1) & " does not direct to any user profile!",ServerNumber ElseIf GetIniFile("" & Channel & ".txt",words(1),"Protect","")="Yes" then Ntc Nickname, "Error: This user is protected!",ServerNumber ElseIf GetIniFile("" & Channel & ".txt",GetIdentifier("$mask($nick(" & Channel & "," & Nickname & ").mask,2)",ServerNumber),"Special","")="S" then Ntc Nickname, "Sorry, you are restricted from using this command!",ServerNumber ElseIf Left(GetIniFile("" & Channel & ".txt",words(1),"Host",""),1)="s" then Ntc Nickname, "Error: This user is suspended!",ServerNumber Elseif not GetIniFile("" & Channel & ".txt",GetIdentifier("$mask($nick(" & Channel & "," & Nickname & ").mask,2)",ServerNumber),"Protect","") ="Yes" and GetIniFile("" & Channel & ".txt",words(1),"Admin","")="Yes" then Ntc Nickname, "Error: You cannot delete other admins!",ServerNumber Else Ntc Nickname, "" & GetIniFile("" & Channel & ".txt",words(1),"Nick","") & " has been unregistered!",ServerNumber WriteIniFile"" & Channel & ".txt",GetIniFile("" & Channel & ".txt",words(1),"Nick",""),"Host","" WriteIniFile"" & Channel & ".txt",words(1),"Nick", "Unregistered on " & Date & "" WriteIniFile"" & Channel & ".txt",words(1),"Host", "Unregistered by " & Host & "" WriteIniFile"" & Channel & ".txt",words(1),"Mod","" WriteIniFile"" & Channel & ".txt",words(1),"Admin","" WriteIniFile"" & Channel & ".txt",words(1),"Protect","" WriteIniFile"" & Channel & ".txt",words(1),"Join","" WriteIniFile"" & Channel & ".txt",words(1),"Note","" WriteIniFile"" & Channel & ".txt",words(1),"Seen","" writeinifile"" & Channel & ".txt",words(1),"Op","" WriteIniFile"" & Channel & ".txt",words(1),"Special","" End If ElseIf GetIniFile("" & Channel & ".txt",Mid(Message,10),"Host","")="" and GetIniFile("" & Channel & ".txt",GetIdentifier("$mask($nick(" & Channel & "," & Mid(Message,10) & ").mask,2)",ServerNumber),"Host","")="" then Ntc Nickname, "User " & Mid(Message,10) & " does not exist",ServerNumber Else If GetIniFile("" & Channel & ".txt",GetIniFile("" & Channel & ".txt",GetIdentifier("$mask($nick(" & Channel & "," & Mid(Message,10) & ").mask,2)",ServerNumber),"Host",""),"Admin","")="" then Ntc Nickname, "Please state " & GetIniFile("" & Channel & ".txt",GetIniFile("" & Channel & ".txt",Mid(Message,10),"Host",""),"Nick","") & "'s log to deluser: (" & Tool & "Deluser " & GetIniFile("" & Channel & ".txt",GetIniFile("" & Channel & ".txt",Mid(Message,10),"Host",""),"Host","") & ") ",ServerNumber Else Ntc Nickname, "Please state " & GetIniFile("" & Channel & ".txt",GetIniFile("" & Channel & ".txt",GetIdentifier("$mask($nick(" & Channel & "," & Mid(Message,10) & ").mask,2)",ServerNumber),"Host",""),"Nick","") & "'s log to deluser: (" & Tool & "Deluser " & GetIniFile("" & Channel & ".txt",GetIniFile("" & Channel & ".txt",GetIdentifier("$mask($nick(" & Channel & "," & Mid(Message,10) & ").mask,2)",ServerNumber),"Host",""),"Host","") & ") ",ServerNumber End If End If Else Ntc Nickname, "Error: Not a channel admin!",ServerNumber End If End Select End If End Sub Sub MNote(NCRhost) Writeinifile"Note.txt",NCRhost,"Checked","0" End Sub Sub FixNick(Nickname) Writeinifile"Spammers.txt","Count",Nickname,"" End Sub Sub Ulist(Nickname,Channel,ServerNumber) lcount = "0" Num = Getidentifier("$lines(" & Channel & ".txt)",ServerNumber) lsus = "0" lmod = "0" lad = "0" If Getinifile("Settings.txt","Settings","Users","")="1" then 'writeinifile"output.txt","Users","Header"," Nickname - Mod - Admin - Protect - Seen - Host" Ntc Nickname, "Nickname - Mod - Admin - Protect - Seen - Host",ServerNumber Else Ntc Nickname, "Bot owner has disabled the listing of all users. Please search for users via &User ",ServerNumber End If Do while not Num < 1 If Mid(Left(Getidentifier("$read(" & Channel & ".txt," & Num & ")",ServerNumber),5),5)="@" then Uhost=Mid(Left(Getidentifier("$read(" & Channel & ".txt," & Num & ")",ServerNumber),len(Getidentifier("$read(" & Channel & ".txt," & Num & ")",ServerNumber)) - 1),2) If not Getinifile("" & Channel & ".txt",Uhost,"Mod","")="" then lcount = lcount -- 1 If Left(Getinifile("" & Channel & ".txt",Uhost,"Host",""),1)="s" then lsus = lsus -- 1 End If If Getinifile("" & Channel & ".txt",Uhost,"Mod","")="Yes" and not Getinifile("" & Channel & ".txt",Uhost,"Admin","")="Yes" then lmod = lmod -- 1 End If If Getinifile("" & Channel & ".txt",Uhost,"Admin","")="Yes" then lad = lad -- 1 End If If Getinifile("Settings.txt","Settings","Users","")="1" then 'writeinifile"output.txt","Users",Num,"" & Getinifile("" & Channel & ".txt",Uhost,"Nick","") & " - " & Getinifile("" & Channel & ".txt",Uhost,"Mod","") & " - " & Getinifile("" & Channel & ".txt",Uhost,"Admin","") & " - " & Getinifile("" & Channel & ".txt",Uhost,"Protect","") & " - " & Getinifile("" & Channel & ".txt",Uhost,"Seen","") & " - " & Uhost & "" Ntc Nickname, "" & Getinifile("" & Channel & ".txt",Uhost,"Nick","") & " - " & Getinifile("" & Channel & ".txt",Uhost,"Mod","") & " - " & Getinifile("" & Channel & ".txt",Uhost,"Admin","") & " - " & Getinifile("" & Channel & ".txt",Uhost,"Protect","") & " - " & Getinifile("" & Channel & ".txt",Uhost,"Seen","") & " - " & Uhost & "",ServerNumber End If End If End If Num = Num - 1 If Num < 1 then If Getinifile("Settings.txt","Settings","Users","")="1" then Ntc Nickname, "Listed " & lcount & " registered users, " & lsus & " suspended, " & lmod & " moderators and " & lad & " admins",ServerNumber Else Ntc Nickname, "However there are " & lcount & " registered users, " & lsus & " suspended, " & lmod & " moderators and " & lad & " admins",ServerNumber End If End If Loop End Sub Sub Addaban(Channel,Host,Reason,ServerNumber) Num = "0" Count = Getidentifier("$nick(" & Channel & ",0),ServerNumber") Do while not Num = Count -- 1 Num = Num -- 1 If Not Getidentifier("$nick(" & Channel & "," & Num & "),ServerNumber")="$null" then Ghost = Getidentifier("$nick(" & Channel & "," & Num & "),ServerNumber") If Instr(Lcase(GetIdentifier("$mask($nick(" & Channel & "," & Ghost & ").mask,2)",ServerNumber)),Lcase(Host)) then SendCommand "/kick " & Getidentifier("$nick(" & Channel & "," & Num & "),ServerNumber") & " " & Reason & "",ServerNumber End If End If Loop End Sub Sub Banlist(Nickname,Channel,ServerNumber,Message) Bcheck = "51" Bmsg = Message Bgen="" Bfound = "" If Message="2" then Notemem="0" Scount="" Do while not Notemem > 50 Notemem = Notemem -- 1 If not Notemem > 50 then If not Getinifile("" & Channel & ".txt","Blist",Notemem,"")="" then Scount = Scount + ", " & Notemem & "" End If Elseif not Scount = "" then Ntc Nickname, "Banlist (Short): " & Mid(Scount,2) & "",ServerNumber Else Ntc Nickname, "The ban list is empty!",ServerNumber End If Loop ElseIf not Message = "1" then Do while not Bcheck < "1" Bcheck = Bcheck - 1 If not Bcheck < "1" then If Lcase(GetIniFile("" & channel & ".txt","Blist",Bcheck,"")) = Lcase(Bmsg) then Bgen= ", " & Bcheck & "" + Bgen Bfound = "1" ElseIf InStr(Lcase(Bmsg),Lcase(GetIniFile("" & channel & ".txt","Blist",Bcheck,""))) and not GetIniFile("" & channel & ".txt","Blist",Bcheck,"") = "" then Ntc Nickname, "Shorter ban found on ban line: " & Bcheck & "",ServerNumber Exit Sub ElseIf InStr(Lcase(GetIniFile("" & channel & ".txt","Blist",Bcheck,"")),Lcase(Bmsg)) then Bgen= ", " & Bcheck & "" + Bgen Bfound = "1" End If Else If Bfound="1" then Ntc Nickname, "Ban found on line: " & Mid(Bgen,2) & "",ServerNumber Else Ntc Nickname, "No bans were found matching your criteria",ServerNumber End If End If Loop Else Ntc Nickname, "Banned Host - Who Banned - Date Banned - Reason",ServerNumber Bgen = "0" Do while not Bcheck < "1" Bcheck = Bcheck - 1 If not Bcheck < "1" then If not Lcase(GetIniFile("" & channel & ".txt","Blist",Bcheck,"")) = "" then Ntc Nickname, "" & GetIniFile("" & channel & ".txt","Blist",Bcheck,"") & " - " & GetIniFile("" & channel & ".txt","Blist","" & Bcheck & "i","") & "",ServerNumber Bgen = Bgen -- 1 End If Else Ntc Nickname, "Listed " & Bgen & " bans",ServerNumber End If Loop End If End Sub Sub Newchan(Nickname,Registrar,Channel,ServerNumber,Reason) Tool = Getinifile("Settings.txt","Settings","Tool","") If Not IsOp(Getidentifier("$me",ServerNumber),channel,ServerNumber) then SendCommand "/notice " & Registrar & " Error: I'm not a channel op! Network or channel restrictions apply. Registration denied",ServerNumber Sendcommand "/part " & channel & "",ServerNumber ElseIf Not IsOp(Nickname,channel,ServerNumber) or GetIdentifier("$mask($nick(" & channel & "," & Nickname & ").mask,2)",ServerNumber)="$null" then SendCommand "/notice " & Registrar & " Error: " & Nickname & " does not have OP! Please have them claim OP status and retry",ServerNumber Sendcommand "/part " & channel & "",ServerNumber Else WriteIniFile"" & channel & ".txt","Register","Reason",Reason WriteIniFile"" & channel & ".txt","Register","Allowed","Yes" writeIniFile"" & channel & ".txt","op","Set","1" WriteIniFile"" & channel & ".txt","Topic","Ident","Welcome to " & channel & " ||" WriteIniFile"" & channel & ".txt","Topic","Topic","" WriteIniFile"" & channel & ".txt","Topic","Lock","Off" writeIniFile"" & channel & ".txt","DCC","Allowed","2" Writeinifile"" & channel & ".txt","Joinmsg","Msg","Welcome back!" WriteIniFile"" & channel & ".txt","Allowpm","Set","Yes" WriteIniFile"" & channel & ".txt","Spam","Nospam","Off" WriteIniFile"" & channel & ".txt","Spam","Message","0" WriteIniFile"" & channel & ".txt","Spam","Num","4" WriteIniFile"" & channel & ".txt","Spam","Ops","On" writeinifile"" & Channel & ".txt","Modecheck","Enable","Off" WriteIniFile"" & channel & ".txt",Getinifile("Settings.txt","Settings","Bhost",""),"Nick",GetIdentifier("$me",ServerNumber) WriteIniFile"" & channel & ".txt",Getinifile("Settings.txt","Settings","Bhost",""),"Host",Getinifile("Settings.txt","Settings","Bhost","") WriteIniFile"" & channel & ".txt",Getinifile("Settings.txt","Settings","Bhost",""),"Mod","Yes" WriteIniFile"" & channel & ".txt",Getinifile("Settings.txt","Settings","Bhost",""),"Admin","Yes" WriteIniFile"" & channel & ".txt",Getinifile("Settings.txt","Settings","Bhost",""),"Protect","Yes" WriteIniFile"" & channel & ".txt",Getinifile("Settings.txt","Settings","Bhost",""),"Join","Bot Reactivated" WriteIniFile"" & channel & ".txt",GetIdentifier("$mask($nick(" & channel & "," & Nickname & ").mask,2)",ServerNumber),"Nick", Nickname WriteIniFile"" & channel & ".txt",GetIdentifier("$mask($nick(" & channel & "," & Nickname & ").mask,2)",ServerNumber),"Host", GetIdentifier("$mask($nick(" & channel & "," & Nickname & ").mask,2)",ServerNumber) WriteIniFile"" & channel & ".txt",GetIdentifier("$mask($nick(" & channel & "," & Nickname & ").mask,2)",ServerNumber),"Mod","Yes" WriteIniFile"" & channel & ".txt",GetIdentifier("$mask($nick(" & channel & "," & Nickname & ").mask,2)",ServerNumber),"Admin","Yes" WriteIniFile"" & channel & ".txt",GetIdentifier("$mask($nick(" & channel & "," & Nickname & ").mask,2)",ServerNumber),"Protect","Yes" WriteIniFile"" & channel & ".txt",GetIniFile("" & channel & ".txt",GetIdentifier("$mask($nick(" & channel & "," & Nickname & ").mask,2)",ServerNumber),"Nick",""),"Host",GetIdentifier("$mask($nick(" & channel & "," & Nickname & ").mask,2)",ServerNumber) Ntc Nickname, "You are now registered as " & Nickname & " $mask($nick(" & channel & "," & Nickname & ").mask,2) ",ServerNumber Ntc Nickname, "Your command access list can be found using " & Tool & "Help. Get info about a command via " & Tool & "Help ",ServerNumber End If End Sub Sub Onmove(Nickname,Channel,Snick,Snick2,ServerNumber) Notemem="0" Do while not Notemem > 49 Notemem = Notemem -- 1 If not Getinifile("Note.txt",Snick,Notemem,"")="" then Writeinifile"Note.txt",Snick2,Notemem,Getinifile("Note.txt",Snick,Notemem,"") Writeinifile"Note.txt",Snick,Notemem,"" End If Loop WriteIniFile"" & channel & ".txt",Getinifile("" & channel & ".txt",Snick2,"Nick",""),"Host","" WriteIniFile"" & channel & ".txt",Snick2,"Nick",GetIniFile("" & channel & ".txt",Snick,"Nick","") WriteIniFile"" & channel & ".txt",Snick2,"Host",Snick2 WriteIniFile"" & channel & ".txt",Snick2,"Mod",GetIniFile("" & channel & ".txt",Snick,"Mod","") WriteIniFile"" & channel & ".txt",Snick2,"Admin",GetIniFile("" & channel & ".txt",Snick,"Admin","") WriteIniFile"" & channel & ".txt",Snick2,"Protect",GetIniFile("" & channel & ".txt",Snick,"Protect","") WriteIniFile"" & channel & ".txt",Snick2,"Join",GetIniFile("" & channel & ".txt",Snick,"Join","") WriteIniFile"" & channel & ".txt",Snick2,"Note",GetIniFile("" & channel & ".txt",Snick,"Note","") WriteIniFile"" & channel & ".txt",Snick2,"Seen",GetIniFile("" & channel & ".txt",Snick,"Seen","") writeinifile"" & channel & ".txt",Snick2,"Op",GetIniFile("" & channel & ".txt",Snick,"Op","") WriteIniFile"" & channel & ".txt",Snick2,"Special",GetIniFile("" & channel & ".txt",Snick,"Special","") WriteIniFile"" & channel & ".txt",GetIniFile("" & channel & ".txt",Snick2,"Nick",""),"Host",Snick2 WriteIniFile"" & channel & ".txt",Snick,"Nick"," Unregistered on " & Date & "" WriteIniFile"" & channel & ".txt",Snick,"Host"," Moved accounts to " & Snick2 & "" WriteIniFile"" & channel & ".txt",Snick,"Mod","" WriteIniFile"" & channel & ".txt",Snick,"Admin","" WriteIniFile"" & channel & ".txt",Snick,"Protect","" WriteIniFile"" & channel & ".txt",Snick,"Join","" WriteIniFile"" & channel & ".txt",Snick,"Note","" WriteIniFile"" & channel & ".txt",Snick,"Seen","" writeinifile"" & channel & ".txt",Snick,"Op","" WriteIniFile"" & channel & ".txt",Snick,"Special","" Ntc Nickname, "The account has been moved successfully!",ServerNumber End Sub Sub ONMODE(Channel,ModeSetter,Mode,ServerNumber) If Getinifile("Settings.txt","Settings","Pass","") = "" then exit sub if Modesetter = Getidentifier("$me",servernumber) then exit sub If Mode = "-o " & ModeSetter & "" then exit sub If Getinifile("" & Channel & ".txt","Modecheck","Enable","") = "" then writeinifile"" & Channel & ".txt","Modecheck","Enable","Off" If Getinifile("" & Channel & ".txt","Modecheck","Enable","") = "Off" then exit sub If GetIniFile("" & channel & ".txt",GetIdentifier("$mask($nick(" & channel & "," & ModeSetter & ").mask,2)",ServerNumber),"Admin","") ="Yes" and GetIniFile("" & channel & ".txt","op","Set","")="0" and GetIniFile("" & channel & ".txt",GetIdentifier("$mask($nick(" & channel & "," & ModeSetter & ").mask,2)",ServerNumber),"Protect","") ="Yes" then exit sub If GetIniFile("" & channel & ".txt",GetIdentifier("$mask($nick(" & channel & "," & ModeSetter & ").mask,2)",ServerNumber),"Admin","") ="Yes" and GetIniFile("" & channel & ".txt","op","Set","")="1" then exit sub If GetIniFile("" & channel & ".txt",GetIdentifier("$mask($nick(" & channel & "," & ModeSetter & ").mask,2)",ServerNumber),"Admin","") ="Yes" and GetIniFile("" & channel & ".txt","op","Set","")="2" then exit sub If GetIniFile("" & channel & ".txt",GetIdentifier("$mask($nick(" & channel & "," & ModeSetter & ").mask,2)",ServerNumber),"Mod","") ="Yes" and GetIniFile("" & channel & ".txt","op","Set","")="2" then exit sub If instr(Mode,"o") then Mmode = Split(Mode," ") Nmode = Len(Mmode(0)) Rmode = "" Do while not Nmode < "1" If Mid(Left(Mode,Nmode),Nmode)="+" then Rmode = "-" & Rmode & "" Elseif Mid(Left(Mode,Nmode),Nmode)="-" then Rmode = "+" & Rmode & "" Else Rmode = Mid(Left(Mode,Nmode),Nmode) + Rmode End If Nmode = Nmode - 1 If Nmode < "1" then If Mid(Mode,Len(Mmode(0)) -- 2) = Getidentifier("$me",ServerNumber) then exit sub Sendcommand "/mode " & Channel & " -o " & ModeSetter & "",ServerNumber Sendcommand "/mode " & channel & " " & Rmode & " " & Mid(Mode,Len(Mmode(0)) -- 2) & "",ServerNumber End If loop End If End Sub