Dim Ver Ver="Beta 1.0.1" 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","&" End If 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) & "" 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("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 Sendcommand "/notice " & Nickname & " Propper 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 Sendcommand "/notice " & Nickname & " Error: No permission!",ServerNumber Elseif Getinifile("Settings.txt","Settings","Tool","") = "&" then Sendcommand "/notice " & Nickname & " Error: You already have this as your current tool!",ServerNumber Else Writeinifile"Settings.txt","Settings","Tool","&" Sendcommand "/notice " & 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 SendCommand "/notice " & Nickname & " Error: Please use another nickname to avoid account conflict.",ServerNumber Exit Sub End If If Lcase(words(2)) = "1" then If GetIniFile("" & words(0) & ".txt",Getidentifier("$mask(" & Nickname & "!" & Host & ",2)"),"Admin","") = "Yes" then SendCommand "/notice " & 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 ElseIf Lcase(words(2)) = "2" then If GetIniFile("" & words(0) & ".txt",Getidentifier("$mask(" & Nickname & "!" & Host & ",2)"),"Protect","") = "Yes" then SendCommand "/notice " & 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 ElseIf Lcase(words(2)) = "3" then If Lcase(Words(4)) = "script" then SendCommand "/notice " & Nickname & " Sending you your latest revision...",ServerNumber SendCommand "/dcc send " & Nickname & " authscript.ice",ServerNumber Exit Sub ElseIf Getinifile("" & Words(4) & ".txt","Register","Allowed","")="" then SendCommand "/notice " & Nickname & " Error: This channel or command does not exist!",ServerNumber Exit Sub ElseIf not Getinifile("" & Words(4) & ".txt","Register","Allowed","")="" then SendCommand "/notice " & Nickname & " Sending you your requested channel info...",ServerNumber SendCommand "/dcc send " & Nickname & " " & Words(4) & ".txt",ServerNumber Exit Sub End If Elseif Lcase(words(2))>3 or Lcase(words(2))<1 then Exit Sub End If SendCommand "/mode " & words(0) & " +o " & Nickname & "",ServerNumber SendCommand "/msg " & words(0) & " " & Nickname & " has used override!",ServerNumber Else SendCommand "/notice " & nickname & " Error: Please change your name to your registered nickname before proceeding!",ServerNumber End If Else SendCommand "/notice " & Nickname & " Error: Please join " & words(0) & " before using this command",ServerNumber End If Else SendCommand "/notice " & Nickname & " Error: Wrong password!",ServerNumber End If ElseIf Lcase(words(1))="" & Tool & "message" then If Getinifile("" & words(0) & ".txt",Getidentifier("$mask(" & Nickname & "!" & Host & ",2)"),"Host","")="" then Sendcommand "/notice " & Nickname & " Error: No Permission",ServerNumber ElseIf Mid(Message,Len(words(0)) + Len(Words(1)) -- 3)="" then Sendcommand "/notice " & 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 ElseIf Lcase(Words(2))="check" then 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(" & Nickname & "!" & Host & ",2)"),Notemem,"")="" then If Left(Getinifile("Note.txt",Getidentifier("$mask(" & Nickname & "!" & Host & ",2)"),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 Sendcommand "/notice " & Nickname & " You have no received or saved messages",ServerNumber Elseif Unote = "0" then Sendcommand "/notice " & Nickname & " You have " & Snote & " saved messages on " & Mid(Scount,2) & "",ServerNumber If Snote > 40 and not Snote="50" then Sendcommand "/notice " & Nickname & " Warning: You have used more than 80% of your inbox space! Consider deleting messages",ServerNumber Elseif Snote="50" then Sendcommand "/notice " & Nickname & " Warning: Your inbox is full and you will not be able to receive any more messages!",ServerNumber End If Else Sendcommand "/notice " & Nickname & " You have " & Snote & " saved messages, " & Unote & " unread marked with * on " & Mid(Scount,2) & "",ServerNumber If Snote > 40 and not Snote="50" then Sendcommand "/notice " & Nickname & " Warning: You have used more than 80% of your inbox space! Consider deleting messages",ServerNumber Elseif Snote="50" then Sendcommand "/notice " & Nickname & " Warning: Your inbox is full and you will not be able to receive any more messages!",ServerNumber End If End If Loop ElseIf Lcase(Words(2))="read" then If Mid(Message,Len(words(0)) + Len(Words(1)) + Len(words(2)) -- 4)="" then Sendcommand "/notice " & Nickname & " Error: Please state a message number to read",ServerNumber ElseIf Getinifile("Note.txt",Getidentifier("$mask(" & Nickname & "!" & Host & ",2)"),Mid(Message,Len(words(0)) + Len(Words(1)) + Len(words(2)) -- 4),"")="" then Sendcommand "/notice " & Nickname & " Error: Invalid message",ServerNumber Else Note = Split(Getinifile("Note.txt",Getidentifier("$mask(" & Nickname & "!" & Host & ",2)"),Mid(Message,Len(words(0)) + Len(Words(1)) + Len(words(2)) -- 4),"")," ") If Left(Getinifile("Note.txt",Getidentifier("$mask(" & Nickname & "!" & Host & ",2)"),Mid(Message,Len(words(0)) + Len(Words(1)) + Len(words(2)) -- 4),""),1)="&" then Writeinifile"Note.txt",Getidentifier("$mask(" & Nickname & "!" & Host & ",2)"),Mid(Message,Len(words(0)) + Len(Words(1)) + Len(words(2)) -- 4),Mid(Getinifile("Note.txt",Getidentifier("$mask(" & Nickname & "!" & Host & ",2)"),Mid(Message,Len(words(0)) + Len(Words(1)) + Len(words(2)) -- 4),""),2) Sendcommand "/notice " & Nickname & " Sent by " & Mid(Note(0),2) & " on " & Note(1) & ": " & Mid(Getinifile("Note.txt",Getidentifier("$mask(" & Nickname & "!" & Host & ",2)"),Mid(Message,Len(words(0)) + Len(Words(1)) + Len(words(2)) -- 4),""),Len(Note(0)) + Len(Note(1)) -- 3) Else Sendcommand "/notice " & Nickname & " Sent by " & Note(0) & " on " & Note(1) & ": " & Mid(Getinifile("Note.txt",Getidentifier("$mask(" & Nickname & "!" & Host & ",2)"),Mid(Message,Len(words(0)) + Len(Words(1)) + Len(words(2)) -- 4),""),Len(Note(0)) + Len(Note(1)) -- 3) End If End If ElseIf Lcase(Words(2))="preview" then If Mid(Message,Len(words(0)) + Len(Words(1)) + Len(words(2)) -- 4)="" then Sendcommand "/notice " & Nickname & " Error: Please state a message number to preview",ServerNumber ElseIf Getinifile("Note.txt",Getidentifier("$mask(" & Nickname & "!" & Host & ",2)"),Mid(Message,Len(words(0)) + Len(Words(1)) + Len(words(2)) -- 4),"")="" then Sendcommand "/notice " & Nickname & " Error: Invalid message",ServerNumber Else Note = Split(Getinifile("Note.txt",Getidentifier("$mask(" & Nickname & "!" & Host & ",2)"),Mid(Message,Len(words(0)) + Len(Words(1)) + Len(words(2)) -- 4),"")," ") If Left(Getinifile("Note.txt",Getidentifier("$mask(" & Nickname & "!" & Host & ",2)"),Mid(Message,Len(words(0)) + Len(Words(1)) + Len(words(2)) -- 4),""),1)="&" then Sendcommand "/notice " & Nickname & " Message Info: Sent by " & Mid(Note(0),2) & " on " & Note(1) & "",ServerNumber Else Sendcommand "/notice " & Nickname & " Message Info: Sent by " & Note(0) & " on " & Note(1) & "",ServerNumber End If End If ElseIf Lcase(Words(2))="delete" then If Mid(Message,Len(words(0)) + Len(Words(1)) + Len(words(2)) -- 4)="" then Sendcommand "/notice " & Nickname & " Error: Please state a message number to delete",ServerNumber ElseIf Mid(Message,Len(words(0)) + Len(Words(1)) + Len(words(2)) -- 4)="all" then Notemem = "0" Do while not Notemem > 50 Notemem = Notemem -- 1 If not Notemem > 50 then Writeinifile"Note.txt",Getidentifier("$mask(" & Nickname & "!" & Host & ",2)"),Notemem,"" Else Sendcommand "/notice " & Nickname & " All messages deleted!",ServerNumber End If Loop ElseIf Getinifile("Note.txt",Getidentifier("$mask(" & Nickname & "!" & Host & ",2)"),Mid(Message,Len(words(0)) + Len(Words(1)) + Len(words(2)) -- 4),"")="" then Sendcommand "/notice " & Nickname & " Error: Invalid message",ServerNumber Else Writeinifile"Note.txt",Getidentifier("$mask(" & Nickname & "!" & Host & ",2)"),Mid(Message,Len(words(0)) + Len(Words(1)) + Len(words(2)) -- 4),"" Sendcommand "/notice " & Nickname & " Message " & Mid(Message,Len(words(0)) + Len(Words(1)) + Len(words(2)) -- 4) & " erased",ServerNumber End if Elseif Lcase(Words(2))="send" then If Mid(Message,Len(Words(0)) + Len(Words(1)) + Len(Words(2)) -- 4)="" then Sendcommand "/notice " & Nickname & " Error: Please state a user followed by a message!",ServerNumber ElseIf Mid(Message,Len(Words(0)) + Len(Words(1)) + Len(Words(2)) + Len(Words(3)) -- 5)="" then Sendcommand "/notice " & Nickname & " Error: Please state a user followed by a message!",ServerNumber ElseIf GetIniFile("" & words(0) & ".txt",GetIdentifier("$mask($nick(" & words(0) & "," & Words(3) & ").mask,2)",ServerNumber),"Host","")="" and GetIniFile("" & words(0) & ".txt",words(3),"Host","")="" then Sendcommand "/notice " & Nickname & " Error: " & Words(3) & " 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(" & words(0) & "," & Words(3) & ").mask,2)",ServerNumber),Getidentifier("$mask(" & Nickname & "!" & Host & ",2)"),"")="" or not GetIniFile("Note.txt",GetIniFile("" & words(0) & ".txt",words(3),"Host",""),Getidentifier("$mask(" & Nickname & "!" & Host & ",2)"),"")="" or Lcase(words(3)) = Lcase(Getidentifier("$me",ServerNumber)) then Sendcommand "/notice " & 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)) + Len(Words(3)) -- 5)) > 215 then Sendcommand "/notice " & Nickname & " Error: Your message cannot be longer than 215 characters! (" & Len(Mid(Message,Len(Words(0)) + Len(Words(1)) + Len(Words(2)) + Len(Words(3)) -- 5)) & ")",ServerNumber Else Notemem="0" If GetIdentifier("$mask($nick(" & words(0) & "," & Words(3) & ").mask,2)",ServerNumber)="$null" then Mhost=GetIniFile("" & words(0) & ".txt",words(3),"Host","") Else Mhost=GetIdentifier("$mask($nick(" & words(0) & "," & Words(3) & ").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("" & words(0) & ".txt",Getidentifier("$mask(" & Nickname & "!" & Host & ",2)"),"Nick","") & " " & Getidentifier("$date",ServerNumber) & " " & Mid(Message,Len(Words(0)) + Len(Words(1)) + Len(Words(2)) + Len(Words(3)) -- 4) & "" Notemem = 50 If Getidentifier("$mask(" & Nickname & "!" & Host & ",2)")=Mhost then Sendcommand "/notice " & Nickname & " Draft saved!",ServerNumber Else Sendcommand "/notice " & Nickname & " Message sent!",ServerNumber End If If not GetIdentifier("$mask($nick(" & words(0) & "," & Words(3) & ").mask,2)",ServerNumber)="$null" and not Words(3)=Nickname then Sendcommand "/notice " & words(3) & " You have received a new message from " & Nickname & "!",ServerNumber End If Elseif Notemem = "50" then Sendcommand "/notice " & Nickname & " Error: This user's inbox is full and cannot receive any more messages!",ServerNumber End if Loop End If ElseIf Lcase(Words(2))="block" then If Mid(Message,Len(Words(0)) + Len(Words(1)) + Len(Words(2)) -- 4)="" then Sendcommand "/notice " & Nickname & " Error: Please state a user to block!",ServerNumber ElseIf GetIniFile("" & words(0) & ".txt",GetIdentifier("$mask($nick(" & words(0) & "," & Words(3) & ").mask,2)",ServerNumber),"Host","")="" and GetIniFile("" & words(0) & ".txt",GetIniFile("" & words(0) & ".txt",words(3),"Host",""),"Host","")="" then Sendcommand "/notice " & Nickname & " Error: " & Words(3) & " 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(" & Nickname & "!" & Host & ",2)"),GetIniFile("" & words(0) & ".txt",words(3),"Host",""),"")="" or not GetIniFile("Note.txt",Getidentifier("$mask(" & Nickname & "!" & Host & ",2)"),GetIdentifier("$mask($nick(" & words(0) & "," & Words(3) & ").mask,2)",ServerNumber),"")="" then Sendcommand "/notice " & Nickname & " Error: You have already blocked this user from sending you messages",ServerNumber ElseIf not GetIniFile("" & words(0) & ".txt",words(3),"Host","")="" then WriteiniFile"Note.txt",Getidentifier("$mask(" & Nickname & "!" & Host & ",2)"),GetIniFile("" & words(0) & ".txt",words(3),"Host",""),"Banned" Sendcommand "/notice " & Nickname & " Blocked " & GetIniFile("" & words(0) & ".txt",words(3),"Host","") & "",ServerNumber Else WriteIniFile"Note.txt",Getidentifier("$mask(" & Nickname & "!" & Host & ",2)"),GetIdentifier("$mask($nick(" & words(0) & "," & Words(3) & ").mask,2)",ServerNumber),"Banned" Sendcommand "/notice " & Nickname & " Blocked " & GetIdentifier("$mask($nick(" & words(0) & "," & Words(3) & ").mask,2)",ServerNumber) & "",ServerNumber End If ElseIf Lcase(Words(2))="unblock" then If Mid(Message,Len(Words(0)) + Len(Words(1)) + Len(Words(2)) -- 4)="" then Sendcommand "/notice " & Nickname & " Error: Please state a user to unblock!",ServerNumber ElseIf GetIniFile("" & words(0) & ".txt",GetIdentifier("$mask($nick(" & words(0) & "," & Words(3) & ").mask,2)",ServerNumber),"Host","")="" and GetIniFile("" & words(0) & ".txt",GetIniFile("" & words(0) & ".txt",words(3),"Host",""),"Host","")="" then Sendcommand "/notice " & Nickname & " Error: " & Words(3) & " is not a registered user to the channel!",ServerNumber Elseif GetIniFile("Note.txt",Getidentifier("$mask(" & Nickname & "!" & Host & ",2)"),GetIniFile("" & words(0) & ".txt",words(3),"Host",""),"")="" and GetIniFile("Note.txt",Getidentifier("$mask(" & Nickname & "!" & Host & ",2)"),GetIdentifier("$mask($nick(" & words(0) & "," & Words(3) & ").mask,2)",ServerNumber),"")="" then Sendcommand "/notice " & Nickname & " Error: This user is not blocked from sending you messages",ServerNumber ElseIf not GetIniFile("" & words(0) & ".txt",words(3),"Host","")="" then WriteiniFile"Note.txt",Getidentifier("$mask(" & Nickname & "!" & Host & ",2)"),GetIniFile("" & words(0) & ".txt",words(3),"Host",""),"" Sendcommand "/notice " & Nickname & " Unlocked " & GetIniFile("" & words(0) & ".txt",words(3),"Host","") & "",ServerNumber Else WriteIniFile"Note.txt",Getidentifier("$mask(" & Nickname & "!" & Host & ",2)"),GetIdentifier("$mask($nick(" & words(0) & "," & Words(3) & ").mask,2)",ServerNumber),"" Sendcommand "/notice " & Nickname & " Unlocked " & GetIdentifier("$mask($nick(" & words(0) & "," & Words(3) & ").mask,2)",ServerNumber) & "",ServerNumber End If End If ElseIf Lcase(Left(Words(1),1))=Tool and GetIniFile("" & words(0) & ".txt","Allowpm","Set","")="No" then Sendcommand "/notice " & Nickname & " Error: PM commands have been disabled by request on " & Words(0) & "",ServerNumber Exit Sub End If If Left(words(1),1) = Tool Then Select Case Replace(LCase(words(1)),Tool,"") Case "chaninfo" If GetIniFile("" & words(0) & ".txt","DCC","Allowed","")="0" then dchk="Channel Owner" ElseIf GetIniFile("" & words(0) & ".txt","DCC","Allowed","")="1" then dchk="Admins" ElseIf GetIniFile("" & words(0) & ".txt","DCC","Allowed","")="2" then dchk="Moderators" ElseIf GetIniFile("" & words(0) & ".txt","DCC","Allowed","")="3" then dchk="Registered Users" End If SendCommand "/notice " & Nickname & " Allow automatic registration: " & Getinifile("" & Words(0) & ".txt","Register","Allowed","") & " ; Locked topic: " & Getinifile("" & Words(0) & ".txt","Topic","Lock","") & " ; Op mode: " & GetIniFile("" & words(0) & ".txt","op","Set","") & " ; Userlist Availablity: " & dchk & " ; PM commands: " & Getinifile("" & words(0) & ".txt","Allowpm","Set","") & "",ServerNumber SendCommand "/notice " & Nickname & " Default topic: " & Getinifile("" & Words(0) & ".txt","Topic","Ident","") & " Real topic: " & Getinifile("" & Words(0) & ".txt","Topic","Topic","") & "",ServerNumber If Getinifile("" & Words(0) & ".txt","Joinmsg","Msg","")="" then SendCommand "/notice " & Nickname & " Greet message: Welcome back (Default) ",ServerNumber ElseIf Getinifile("" & Words(0) & ".txt","Joinmsg","Msg","")="&" then SendCommand "/notice " & Nickname & " Greet message is disabled",ServerNumber Else SendCommand "/notice " & Nickname & " Greet Message: " & Getinifile("" & Words(0) & ".txt","Joinmsg","Msg","") & "",ServerNumber End If Case "botinfo" If GetIniFile("" & words(0) & ".txt",Getidentifier("$mask(" & Nickname & "!" & Host & ",2)"),"Host","")=Getidentifier("$mask(" & Nickname & "!" & Host & ",2)") then If Getinifile("Settings.txt","Settings","Users","")="1" then list="In Chat" Else list="Search Only" End If Sendcommand "/notice " & Nickname & " Main Channel: " & Getinifile("Settings.txt","Settings","Channel","") & " - Registered bot host: " & Getinifile("Settings.txt","Settings","Bhost","") & " - Userlist View Type: " & list & " - Version: " & Ver & "",ServerNumber Else Sendcommand "/notice " & Nickname & " Error: No Permission",ServerNumber End If Case "userlist" if Mid(Message,Len(Words(0)) + Len(Words(1)) -- 3)="" then SendCommand "/notice " & Nickname & " Please view help information for this command",ServerNumber Elseif getIniFile("" & words(0) & ".txt",Getidentifier("$mask(" & Nickname & "!" & Host & ",2)"),"Protect","")="Yes" then If Lcase(Words(2))="view" then If words(0) = Getinifile("Settings.txt","Settings","Channel","") then If Lcase(Mid(Message,Len(Words(0)) + Len(Words(1)) + Len(Words(2)) -- 4))="0" then If Getinifile("Settings.txt","Settings","Users","")="0" then Sendcommand "/notice " & Nickname & " Error: Already set to search only",ServerNumber Else Writeinifile"Settings.txt","Settings","Users","0" Sendcommand "/notice " & Nickname & " User and ban list is now set to be viewed by search function",ServerNumber End If ElseIf Lcase(Mid(Message,Len(Words(0)) + Len(Words(1)) + Len(Words(2)) -- 4))="1" then If Getinifile("Settings.txt","Settings","Users","")="1" then Sendcommand "/notice " & Nickname & " Error: Already set to Chat",ServerNumber Else Writeinifile"Settings.txt","Settings","Users","1" Sendcommand "/notice " & Nickname & " User and ban list is now set to be viewed in chat",ServerNumber End If End If End If Elseif words(2)="0" then If not GetIniFile("" & words(0) & ".txt","DCC","Allowed","")="0" then writeIniFile"" & words(0) & ".txt","DCC","Allowed","0" SendCommand "/notice " & Nickname & " Only channel owner may now get the user list",ServerNumber Else SendCommand "/notice " & Nickname & " Error: Already set!",ServerNumber End If ElseIf words(2)="1" then If not GetIniFile("" & words(0) & ".txt","DCC","Allowed","")="1" then writeIniFile"" & words(0) & ".txt","DCC","Allowed","1" SendCommand "/notice " & Nickname & " Channel admins and up may now get the user list",ServerNumber Else SendCommand "/notice " & Nickname & " Error: already set!",ServerNumber End If ElseIf words(2)="2" then If not GetIniFile("" & words(0) & ".txt","DCC","Allowed","")="2" then writeIniFile"" & words(0) & ".txt","DCC","Allowed","2" SendCommand "/notice " & Nickname & " Channel moderators and up may now get the user list",ServerNumber Else SendCommand "/notice " & Nickname & " Error: already set!",ServerNumber End If ElseIf words(2)="3" then If not GetIniFile("" & words(0) & ".txt","DCC","Allowed","")="3" then writeIniFile"" & words(0) & ".txt","DCC","Allowed","3" SendCommand "/notice " & Nickname & " Channel users and up may now get the user list",ServerNumber Else SendCommand "/notice " & Nickname & " Error: already set!",ServerNumber End If End If Else SendCommand "/notice " & Nickname & " Error: Not a channel owner!",ServerNumber End If Case "allowpm" If not GetIniFile("" & words(0) & ".txt",Getidentifier("$mask(" & Nickname & "!" & Host & ",2)"),"Protect","")="Yes" then SendCommand "/notice " & Nickname & " Error: Not a channel owner",ServerNumber Elseif Mid(Message,Len(Words(0)) -- len(words(1)) -- 3) = "" then Sendcommand "/notice " & Nickname & " Please see help information for this command",ServerNumber ElseIf Lcase(words(2))="0" then writeIniFile"" & Channel & ".txt","Allowpm","Set","No" Sendcommand "/notice " & Nickname & " PM commands are now disabled!",ServerNumber End If Case "help" If mid(Mid(Message,Len(Words(0)) -- 2),6)="" then If GetIniFile("" & words(0) & ".txt",Getidentifier("$mask(" & Nickname & "!" & Host & ",2)"),"Admin","")="" then SendCommand "/notice " & Nickname & " Your commands are: " & Tool & "Register, " & Tool & "Chaninfo, " & Tool & "Help, " & Tool & "Botinfo",ServerNumber ElseIf Left(GetIniFile("" & words(0) & ".txt",Getidentifier("$mask(" & Nickname & "!" & Host & ",2)"),"Host",""),1)="s" then SendCommand "/notice " & Nickname & " Your commands are: " & Tool & "Chaninfo, " & Tool & "Help, " & Tool & "Unregister, " & Tool & "Botinfo",ServerNumber ElseIf GetIniFile("" & words(0) & ".txt",Getidentifier("$mask(" & Nickname & "!" & Host & ",2)"),"Mod","")="No" then SendCommand "/notice " & 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("" & words(0) & ".txt",Getidentifier("$mask(" & Nickname & "!" & Host & ",2)"),"Mod","")="Yes" and GetIniFile("" & Channel & ".txt",GetIdentifier("$mask($nick(" & Channel & "," & Nickname & ").mask,2)",ServerNumber),"Admin","")="No" then SendCommand "/notice " & 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",ServerNumber ElseIf GetIniFile("" & words(0) & ".txt",Getidentifier("$mask(" & Nickname & "!" & Host & ",2)"),"Admin","")="Yes" then SendCommand "/notice " & 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",ServerNumber SendCommand "/notice " & Nickname & " Admin commands: " & Tool & "Deluser, " & Tool & "Op, " & Tool & "Deop, " & Tool & "Moderate, " & Tool & "Demoderate, " & Tool & "Clearinfo, " & Tool & "Infolock, " & Tool & "Suspend, " & Tool & "Unsuspend, " & Tool & "Spam",ServerNumber If GetIniFile("" & words(0) & ".txt",Getidentifier("$mask(" & Nickname & "!" & Host & ",2)"),"Protect","")="Yes" then If words(0)=Getinifile("Settings.txt","Settings","Channel","") then SendCommand "/notice " & 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",ServerNumber Else SendCommand "/notice " & 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",ServerNumber End If End If End If Else Select Case Lcase(words(2)) Case "up" SendCommand "/notice " & Nickname & " Use this to gain the highest attainable user mode in a channel based on your user level and channel settings",ServerNumber Case "down" SendCommand "/notice " & Nickname & " Use this to remove all channel user modes",ServerNumber Case "register" SendCommand "/notice " & Nickname & " Use this to register with the channel and gain basic bot commands",ServerNumber Case "voice" SendCommand "/notice " & Nickname & " Use this to give voice to another user. Shortcut " & Tool & "V",ServerNumber Case "devoice" SendCommand "/notice " & Nickname & " Use this to devoice another user. Shortcut " & Tool & "DV",ServerNumber Case "me" SendCommand "/notice " & Nickname & " Use this to get your own personal account information including your note if you have one",ServerNumber Case "user" SendCommand "/notice " & 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" SendCommand "/notice " & Nickname & " Use this to kick a user from your channel. Shortcut " & Tool & "K",ServerNumber Case "ban" SendCommand "/notice " & Nickname & " Use this to ban an active user from your channel. Shortcut " & Tool & "B",ServerNumber Case "unban" SendCommand "/notice " & Nickname & " Use this to unban an active network user from your channel. Shortcut " & Tool & "UB",ServerNumber Case "undoban" SendCommand "/notice " & 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" SendCommand "/notice " & 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" SendCommand "/notice " & Nickname & " Use this to change the end part of your channel's topic",ServerNumber Case "trefresh" SendCommand "/notice " & Nickname & " Use this to reset the last set topic if it is different than before",ServerNumber Case "greet" SendCommand "/notice " & 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" SendCommand "/notice " & Nickname & " Use this to change your on file nickname to your current one",ServerNumber Case "note" SendCommand "/notice " & 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" SendCommand "/notice " & Nickname & " Use this to get basic channel information such as the topic and greet message",ServerNumber Case "seen" SendCommand "/notice " & Nickname & " Use this to get the date of when a specific user joined last",ServerNumber Case "help" SendCommand "/notice " & 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" SendCommand "/notice " & Nickname & " Use this to remove yourself and all permissions from the specified channel user list",ServerNumber Case "snuggle" SendCommand "/notice " & 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" SendCommand "/notice " & Nickname & " Use this to completely delete a registered user from your channel's user list",ServerNumber Case "op" SendCommand "/notice " & 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" SendCommand "/notice " & Nickname & " Use this to deop a registered user on your channel",ServerNumber Case "moderate" SendCommand "/notice " & Nickname & " Use this to give a registered user moderation control over your channel",ServerNumber Case "demoderate" SendCommand "/notice " & Nickname & " Use this to remove moderation (and admin if present) power from a registered user in your channel",ServerNumber Case "clearinfo" SendCommand "/notice " & Nickname & " Use this to clear a registered user's channel join message",ServerNumber Case "infolock" SendCommand "/notice " & Nickname & " Use this to remove the topic and greet editing permissions from being changed by moderators (Toggled)",ServerNumber Case "suspend" SendCommand "/notice " & 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" SendCommand "/notice " & Nickname & " Use this to reinstate a user's power to your channel. Moderation and admin power is automatically restored",ServerNumber Case "override" If GetIniFile("" & words(0) & ".txt",Getidentifier("$mask(" & Nickname & "!" & Host & ",2)"),"Protect","")="Yes" and words(0)=Getinifile("Settings.txt","Settings","Channel","") then SendCommand "/notice " & 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 SendCommand "/notice " & 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 SendCommand "/notice " & 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 Sendcommand "/notice " & Nickname & " No viewable help information",ServerNumber End If Case "newchan" SendCommand "/notice " & Nickname & " Use this to register a new channel with an active new owner via " & Tool & "Newchan ",ServerNumber Case "admin" SendCommand "/notice " & Nickname & " Use this to grant admin powers to a registered user on your channel",ServerNumber Case "deadmin" SendCommand "/notice " & Nickname & " Use this to remove admin powers from a registered user on your channel",ServerNumber Case "dtopic" SendCommand "/notice " & Nickname & " Use this to set the default topic in your channel which is also the first part of the topic",ServerNumber Case "setop" SendCommand "/notice " & Nickname & " Use this to set who can claim op status in your channel. 0 is owner only, 1 is admins and up, 2 is mods and up.",ServerNumber Case "registration" SendCommand "/notice " & Nickname & " Use this to allow automatic user registration 1 or disable it 0",Servernumber Case "addban" SendCommand "/notice " & Nickname & " Use this to ban any hostmask or user name without doing a typical user check",ServerNumber Case "restrict" SendCommand "/notice " & Nickname & " Use this to disallow an admin from changing other user permissions",ServerNumber Case "unrestrict" SendCommand "/notice " & Nickname & " Use this to allow an admin to change other user permissions",ServerNumber Case "move" SendCommand "/notice " & 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" SendCommand "/notice " & 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 Sendcommand "/notice " & Nickname & " You can allow searching or in chat viewable content: " & Tool & "Userlist view 0 or " & Tool & "Userlist view 1",ServerNumber End If SendCommand "/notice " & 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" SendCommand "/notice " & Nickname & " Use this to reverse the mode(s) set on a user whether it be op or voice (Case sensitive)",ServerNumber Case "sync" SendCommand "/notice " & Nickname & " Use this to set all active channel users to their correct channel modes",ServerNumber Case "fix" SendCommand "/notice " & Nickname & " Use this to set a user to their correct channel mode if it has otherwise been changed (Case sensitive)",ServerNumber Case "tool" SendCommand "/notice " & 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" SendCommand "/notice " & Nickname & " Use this to control whether or not users may use bot commands via PM (0 or 1)",ServerNumber Case "spam" SendCommand "/notice " & 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 SendCommand "/notice " & 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" Sendcommand "/notice " & 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" Sendcommand "/notice " & Nickname & " Use this to view the registered users in a channel",ServerNumber Case "botinfo" SendCommand "/notice " & Nickname & " Use this to see bot information",ServerNumber Case "banlist" SendCommand "/notice " & 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 Else SendCommand "/notice " & Nickname & " I did not recognize this command. Make sure it is a vald command for authscript",ServerNumber End Select End If Case "register" If GetIdentifier("$mask($nick(" & words(0) & "," & Nickname & ").mask,2)",ServerNumber)="$null" then Sendcommand "/notice " & Nickname & " Error: Please join " & Words(0) & "",ServerNumber ElseIf not IsVoice(Nickname,words(0),ServerNumber) and not IsOp(Nickname,words(0),ServerNumber) then SendCommand "/notice " & Nickname & " You cannot register! Reason: Not voiced as a requirement!",ServerNumber ElseIf GetIniFile("" & words(0) & ".txt",GetIdentifier("$mask($nick(" & words(0) & "," & Nickname & ").mask,2)",ServerNumber),"Host","")=GetIdentifier("$mask($nick(" & words(0) & "," & Nickname & ").mask,2)",ServerNumber) then SendCommand "/notice " & Nickname & " You cannot register! Reason: You are already registered",ServerNumber ElseIf Mid(GetIniFile("" & words(0) & ".txt",GetIdentifier("$mask($nick(" & words(0) & "," & Nickname & ").mask,2)",ServerNumber),"Host",""),3)=GetIdentifier("$mask($nick(" & words(0) & "," & Nickname & ").mask,2)",ServerNumber) then SendCommand "/notice " & Nickname & " You cannot register! Reason: You are using a suspended account",ServerNumber ElseIf not GetIniFile("" & words(0) & ".txt",Nickname,"Host","") = "" then SendCommand "/notice " & Nickname & " This nickname is already in use!",ServerNumber ElseIf GetIniFile("" & words(0) & ".txt","Register","Allowed","")="Yes" then 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","No" WriteIniFile"" & words(0) & ".txt",GetIdentifier("$mask($nick(" & words(0) & "," & Nickname & ").mask,2)",ServerNumber),"Admin","No" WriteIniFile"" & words(0) & ".txt",GetIdentifier("$mask($nick(" & words(0) & "," & Nickname & ").mask,2)",ServerNumber),"Protect","No" WriteIniFile"" & words(0) & ".txt",GetIdentifier("$mask($nick(" & words(0) & "," & Nickname & ").mask,2)",ServerNumber),"Seen",Date 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) SendCommand "/Notice " & Nickname & " You are now registered as " & Nickname & " $mask($nick(" & words(0) & "," & Nickname & ").mask,2) ",ServerNumber Sendcommand "/notice " & Nickname & " Your command access list can be found using " & Tool & "Help. Get info about a command via " & Tool & "Help ",ServerNumber Else SendCommand "/notice " & Nickname & " You cannot register! Reason: Automatic registration disabled",ServerNumber End If Case "unregister" If GetIniFile("" & Words(0) & ".txt",Getidentifier("$mask(" & Nickname & "!" & Host & ",2)"),"Host","")=Getidentifier("$mask(" & Nickname & "!" & Host & ",2)") or Left(GetIniFile("" & Words(0) & ".txt",Getidentifier("$mask(" & Nickname & "!" & Host & ",2)"),"Host",""),1)="s" then If GetIniFile("" & Words(0) & ".txt",Getidentifier("$mask(" & Nickname & "!" & Host & ",2)"),"Protect","")="Yes" and not GetIniFile("" & Words(0) & ".txt",Getidentifier("$mask(" & Nickname & "!" & Host & ",2)"),"Special","")="Yes" then SendCommand "/notice " & Nickname & " Error: Channel owners cannot remove themselves!",ServerNumber Else WriteIniFile"" & Words(0) & ".txt",GetIniFile("" & Words(0) & ".txt",Getidentifier("$mask(" & Nickname & "!" & Host & ",2)"),"Nick",""),"Host","" WriteIniFile"" & Words(0) & ".txt",Getidentifier("$mask(" & Nickname & "!" & Host & ",2)"),"Nick", "Unregistered on " & Date & "" WriteIniFile"" & Words(0) & ".txt",Getidentifier("$mask(" & Nickname & "!" & Host & ",2)"),"Host", "Unregistered by " & Host & "" WriteIniFile"" & Words(0) & ".txt",Getidentifier("$mask(" & Nickname & "!" & Host & ",2)"),"Mod","" WriteIniFile"" & Words(0) & ".txt",Getidentifier("$mask(" & Nickname & "!" & Host & ",2)"),"Admin","" WriteIniFile"" & Words(0) & ".txt",Getidentifier("$mask(" & Nickname & "!" & Host & ",2)"),"Protect","" WriteIniFile"" & Words(0) & ".txt",Getidentifier("$mask(" & Nickname & "!" & Host & ",2)"),"Join","" WriteIniFile"" & Words(0) & ".txt",Getidentifier("$mask(" & Nickname & "!" & Host & ",2)"),"Note","" WriteIniFile"" & Words(0) & ".txt",Getidentifier("$mask(" & Nickname & "!" & Host & ",2)"),"Seen","" writeinifile"" & words(0) & ".txt",Getidentifier("$mask(" & Nickname & "!" & Host & ",2)"),"Op","" WriteIniFile"" & Words(0) & ".txt",Getidentifier("$mask(" & Nickname & "!" & Host & ",2)"),"Special","" SendCommand "/mode " & Words(0) & " -ov " & Nickname & " " & Nickname & "" SendCommand "/Notice " & Nickname & " You are now unregistered as " & Getidentifier("$mask(" & Nickname & "!" & Host & ",2)") & "",ServerNumber End If Else SendCommand "/notice " & Nickname & " You cannot Unregister! Reason: Not registered!",ServerNumber End If Case "spam" If Not GetIniFile("" & words(0) & ".txt",Getidentifier("$mask(" & Nickname & "!" & Host & ",2)"),"Admin","")="Yes" then Sendcommand "/notice " & Nickname & " Error: No permission!",ServerNumber Elseif Mid(Message,Len(Words(0)) + Len(Words(1)) -- 3)="" then Sendcommand "/notice " & Nickname & " Please see help information for this command",ServerNumber ElseIf Lcase(words(2))="count" then If not words(3)>4 or not words(3)<10 then Sendcommand "/notice " & Nickname & " Error: Please set your kick number between 5 and 9 messages",ServerNumber Else WriteIniFile"" & words(0) & ".txt","Spam","Message",words(3) - 5 Sendcommand "/notice " & Nickname & " Users will now be kicked for sending " & words(3) & " messages in " & GetIniFile("" & words(0) & ".txt","Spam","Num","") & " Seconds",ServerNumber End If ElseIf Lcase(words(2))="time" then If not words(3)>1 or not words(3)<10 then Sendcommand "/notice " & Nickname & " Error: Please set your kick time reset between 2 and 6 seconds",ServerNumber Else WriteIniFile"" & words(0) & ".txt","Spam","Num",words(3) Sendcommand "/notice " & Nickname & " Users will now be kicked for sending " & GetIniFile("" & words(0) & ".txt","Spam","Message","") -- 5 & " messages in " & words(3) & " seconds",ServerNumber End If ElseIf Lcase(words(2))="info" then If GetIniFile("" & words(0) & ".txt","Spam","Nospam","")="On" then If GetIniFile("" & words(0) & ".txt","Spam","Ops","")="On" then Sendcommand "/notice " & Nickname & " Spam detection is enabled: All users will be kicked for sending " & GetIniFile("" & words(0) & ".txt","Spam","Message","") -- 5 & " messages in " & GetIniFile("" & words(0) & ".txt","Spam","Num","") & " seconds",ServerNumber Else Sendcommand "/notice " & Nickname & " Spam detection is enabled: Users excluding ops will be kicked for sending " & GetIniFile("" & words(0) & ".txt","Spam","Message","") -- 5 & " messages in " & GetIniFile("" & words(0) & ".txt","Spam","Num","") & " seconds",ServerNumber End If Else Sendcommand "/notice " & Nickname & " Spam detection is currently off. You can enable this feature by " & Tool & "Spam Set On",ServerNumber End If ElseIf Lcase(words(2))="set" then If Lcase(words(3))="1" then If GetIniFile("" & words(0) & ".txt","Spam","Nospam","")="On" then Sendcommand "/notice " & Nickname & " Error: Already enabled!",ServerNumber Else WriteIniFile"" & words(0) & ".txt","Spam","Nospam","On" Sendcommand "/notice " & Nickname & " Spam detection now enabled!",ServerNumber End If ElseIf Lcase(words(3))="0" then If GetIniFile("" & words(0) & ".txt","Spam","Nospam","")="Off" then Sendcommand "/notice " & Nickname & " Error: Already disabled!",ServerNumber Else WriteIniFile"" & words(0) & ".txt","Spam","Nospam","Off" Sendcommand "/notice " & Nickname & " Spam detection now disabled!",ServerNumber End If End If ElseIf Lcase(words(2))="opdetect" then If Lcase(words(3))="1" then If GetIniFile("" & words(0) & ".txt","Spam","Ops","")="On" then Sendcommand "/notice " & Nickname & " Error: Already enabled!",ServerNumber Else WriteIniFile"" & words(0) & ".txt","Spam","Ops","On" Sendcommand "/notice " & Nickname & " Spam detection for ops now enabled!",ServerNumber End If ElseIf Lcase(words(3))="0" then If GetIniFile("" & words(0) & ".txt","Spam","Ops","")="Off" then Sendcommand "/notice " & Nickname & " Error: Already disabled!",ServerNumber Else WriteIniFile"" & words(0) & ".txt","Spam","Ops","Off" Sendcommand "/notice " & Nickname & " Spam detection for ops now disabled!",ServerNumber End If End If End If Case "users" If not GetIniFile("" & words(0) & ".txt",Getidentifier("$mask(" & Nickname & "!" & Host & ",2)"),"Host","") = "" and GetIniFile("" & words(0) & ".txt","DCC","Allowed","")>"2" then If GetIniFile("Settings.txt","Settings","Users","")="0" then SendCommand "/notice " & Nickname & " Error: Bot owner has disabled the listing of all users. Please search for users via " & Tool & "User ",ServerNumber Else Sendcommand "/! Ulist " & Nickname & "|" & words(0) & "|" & ServerNumber & "" End If ElseIf GetIniFile("" & words(0) & ".txt",Getidentifier("$mask(" & Nickname & "!" & Host & ",2)"),"Mod","") = "Yes" and GetIniFile("" & words(0) & ".txt","DCC","Allowed","")>"1" then If GetIniFile("Settings.txt","Settings","Users","")="0" then SendCommand "/notice " & Nickname & " Error: Bot owner has disabled the listing of all users. Please search for users via " & Tool & "User ",ServerNumber Else Sendcommand "/! Ulist " & Nickname & "|" & words(0) & "|" & ServerNumber & "" End If ElseIf GetIniFile("" & words(0) & ".txt",Getidentifier("$mask(" & Nickname & "!" & Host & ",2)"),"Admin","") = "Yes" and GetIniFile("" & words(0) & ".txt","DCC","Allowed","")>"0" then If GetIniFile("Settings.txt","Settings","Users","")="0" then SendCommand "/notice " & Nickname & " Error: Bot owner has disabled the listing of all users. Please search for users via " & Tool & "User ",ServerNumber Else Sendcommand "/! Ulist " & Nickname & "|" & words(0) & "|" & ServerNumber & "" End If Elseif GetIniFile("" & words(0) & ".txt",Getidentifier("$mask(" & Nickname & "!" & Host & ",2)"),"Protect","") = "Yes" then If GetIniFile("Settings.txt","Settings","Users","")="0" then SendCommand "/notice " & Nickname & " Error: Bot owner has disabled the listing of all users. Please search for users via " & Tool & "User ",ServerNumber Else Sendcommand "/! Ulist " & Nickname & "|" & words(0) & "|" & ServerNumber & "" End If Else SendCommand "/notice " & Nickname & " Error: No permission! - " & GetIniFile("" & words(0) & ".txt","DCC","Allowed","") & "",ServerNumber End If Case "up" If IsOp(Nickname,words(0),ServerNumber) then SendCommand "/notice " & Nickname & " Error: You are up",ServerNumber ElseIf not GetIniFile("" & words(0) & ".txt",Getidentifier("$mask(" & Nickname & "!" & Host & ",2)"),"Host","")=Getidentifier("$mask(" & Nickname & "!" & Host & ",2)") then SendCommand "/notice " & Nickname & " Cannot up! Reason: Not registered",ServerNumber ElseIf GetIniFile("" & words(0) & ".txt",Getidentifier("$mask(" & Nickname & "!" & Host & ",2)"),"Admin","")="Yes" then If not GetIniFile("" & words(0) & ".txt","op","Set","")="0" or GetIniFile("" & words(0) & ".txt",Getidentifier("$mask(" & Nickname & "!" & Host & ",2)"),"Protect","")="Yes" then SendCommand "/mode " & words(0) & " +o " & Nickname & "",ServerNumber Elseif not IsVoice(Nickname,words(0),ServerNumber) then SendCommand "/mode " & words(0) & " +v " & Nickname & "",ServerNumber Else SendCommand "/notice " & Nickname & " Error: You are up!",ServerNumber End If ElseIf GetIniFile("" & words(0) & ".txt",Getidentifier("$mask(" & Nickname & "!" & Host & ",2)"),"Mod","")="Yes" then If GetIniFile("" & words(0) & ".txt","op","Set","")="2" then SendCommand "/mode " & words(0) & " +o " & Nickname & "",ServerNumber Elseif not IsVoice(Nickname,words(0),ServerNumber) then SendCommand "/mode " & words(0) & " +v " & Nickname & "",ServerNumber Else SendCommand "/notice " & Nickname & " Error: You are up!",ServerNumber End If ElseIf GetIniFile("" & words(0) & ".txt",Getidentifier("$mask(" & Nickname & "!" & Host & ",2)"),"Host","")=Getidentifier("$mask(" & Nickname & "!" & Host & ",2)") then If IsVoice(Nickname,words(0),ServerNumber) then SendCommand "/notice " & Nickname & " Error: You are up!",ServerNumber Else SendCommand "/mode " & words(0) & " +v " & Nickname & "",ServerNumber End If End If Case "down" If GetIniFile("" & Words(0) & ".txt",Getidentifier("$mask(" & Nickname & "!" & Host & ",2)"),"Host","")=Getidentifier("$mask(" & Nickname & "!" & Host & ",2)") and not IsVoice(Nickname,words(0),ServerNumber) and not IsOp(Nickname,words(0),ServerNumber) then SendCommand "/notice " & Nickname & " Cannot down! Reason: You are not voiced or opped!",ServerNumber Else SendCommand "/mode " & words(0) & " -ov " & Nickname & " " & Nickname & " ",ServerNumber End If Case "setinfo" If GetIniFile("" & words(0) & ".txt",Getidentifier("$mask(" & Nickname & "!" & Host & ",2)"),"Host","")=Getidentifier("$mask(" & Nickname & "!" & Host & ",2)") then If Mid(Mid(Message,Len(Words(0)) -- 2),10)="" and not GetIniFile("" & words(0) & ".txt",Getidentifier("$mask(" & Nickname & "!" & Host & ",2)"),"Join","")="" then SendCommand "/notice " & Nickname & " Your info has been cleared!",ServerNumber WriteIniFile"" & words(0) & ".txt",Getidentifier("$mask(" & Nickname & "!" & Host & ",2)"),"Join","" ElseIf Lcase(Mid(Mid(Message,Len(Words(0)) -- 2),10))="" and GetIniFile("" & words(0) & ".txt",Getidentifier("$mask(" & Nickname & "!" & Host & ",2)"),"Join","")="" then SendCommand "/notice " & Nickname & " Error: Nothing to clear!",ServerNumber ElseIf Lcase(Left(Mid(Message,Len(Words(0)) -- 11),1))="&" then SendCommand "/notice " & Nickname & " Error: Your info message cannot begin with the & symbol",ServerNumber Else WriteIniFile"" & words(0) & ".txt",Getidentifier("$mask(" & Nickname & "!" & Host & ",2)"),"Join",Mid(Mid(Message,Len(Words(0)) -- 2),10) If Lcase(Mid(Mid(Message,Len(Words(0)) -- 2),10))="0" then SendCommand "/notice " & Nickname & " I will no longer greet you on channel join",ServerNumber Else SendCommand "/notice " & Nickname & " " & Mid(Mid(Message,Len(Words(0)) -- 2),10) & "",ServerNumber End If End If Else Sendcommand "/notice " & Nickname & " Error: No Permission",ServerNumber End If Case "newchan" If words(0)=Getinifile("Settings.txt","Settings","Channel","") and Lcase(Mid(Message,Len(Words(0)) + Len(Words(1)) -- 3))="" then If not Getinifile("Settings.txt","Settings","Channel","")="" then SendCommand "/notice " & nickname & " Correct syntax is " & Tool & "Newchan ",ServerNumber End If ElseIf Getinifile("Settings.txt","Settings","Channel","")="" then SendCommand "/msg " & words(0) & " Sorry, authscript is not set up yet",ServerNumber ElseIf Not Lcase(Mid(Message,Len(Words(0)) + Len(Words(1)) -- 3))="" and words(0)=Getinifile("Settings.txt","Settings","Channel","") and GetIniFile("" & words(0) & ".txt",Getidentifier("$mask(" & Nickname & "!" & Host & ",2)"),"Protect","")="Yes" then If GetIdentifier("$mask($nick(" & words(0) & "," & words(2) & ").mask,2)",ServerNumber)="$null" then SendCommand "/notice " & Nickname & " Please state an active new owner",ServerNumber ElseIf Mid(Message,Len(Words(0)) + Len(Words(1)) + Len(Words(2)) -- 4)="" then Sendcommand "/notice " & nickname & " Please state a channel that is real",ServerNumber ElseIf not Getinifile("" & words(3) & ".txt","Register","Allowed","")="" then Sendcommand "/notice " & Nickname & " Error: Channel is already registered!",ServerNumber Elseif Mid(Message,Len(Words(0)) + Len(Words(1)) + Len(Words(2)) + len(words(3)) -- 5)="" then Sendcommand "/notice " & nickname & " Please state the purpose of this channel",ServerNumber Else Sendcommand "/join " & Words(3) & "",ServerNumber Sendcommand "/timer newchan" & Nickname & " 1 5 /! Newchan " & words(2) & "|" & Nickname & "|" & Words(3) & "|" & ServerNumber & "|" & Mid(Message,Len(Words(0)) + Len(Words(1)) + Len(Words(2)) + len(words(3)) -- 5) & "" End If End If Case "topic" If GetIniFile("" & words(0) & ".txt",Getidentifier("$mask(" & Nickname & "!" & Host & ",2)"),"Host","")=Getidentifier("$mask(" & Nickname & "!" & Host & ",2)") then If getIniFile("" & words(0) & ".txt",Getidentifier("$mask(" & Nickname & "!" & Host & ",2)"),"Mod","")="Yes" then If GetIniFile("" & words(0) & ".txt","Topic","Lock","")="On" and not getIniFile("" & words(0) & ".txt",Getidentifier("$mask(" & Nickname & "!" & Host & ",2)"),"Admin","")="Yes" then SendCommand "/notice " & Nickname & " Cannot change topic! Reason: Locked by an admin",ServerNumber Else SendCommand "/topic " & words(0) & " " & GetIniFile("" & words(0) & ".txt","Topic","Ident","") & " " & Mid(Message,Len(Words(0)) + Len(Words(1)) -- 3) & "",ServerNumber Writeinifile"" & words(0) & ".txt","Topic","Topic",Mid(Message,8) End If Else SendCommand "/notice " & Nickname & " Error: Not a channel moderator!",ServerNumber End If Else SendCommand "/notice " & Nickname & " Error: No Permission",ServerNumber End If Case "seen" If GetIniFile("" & words(0) & ".txt",Getidentifier("$mask(" & Nickname & "!" & Host & ",2)"),"Host","") = Getidentifier("$mask(" & Nickname & "!" & Host & ",2)") then If Mid(Message,Len(Words(0)) -- Len(Words(1)) -- 3)="" then Sendcommand "/notice " & Nickname & " Error: Please state a user to get last seen info",ServerNumber ElseIf GetIniFile("" & Channel & ".txt",GetIdentifier("$mask($nick(" & Channel & "," & words(2) & ").mask,2)",ServerNumber),"Nick","")="" and GetIniFile("" & words(0) & ".txt",words(2),"Host","")="" then SendCommand "/notice " & Nickname & " Error: This user does not exist!",ServerNumber ElseIf not GetIdentifier("$mask($nick(" & words(0) & "," & words(2) & ").mask,2)",ServerNumber)="$null" then SendCommand "/notice " & Nickname & " " & Words(2) & " is active on the channel",ServerNumber ElseIf getIniFile("" & words(0) & ".txt",GetIniFile("" & words(0) & ".txt",words(2),"Host",""),"Seen","")="" then SendCommand "/notice " & Nickname & " Error: This user has insufficient data. Please try again later",ServerNumber Else SendCommand "/notice " & Nickname & " " & Words(2) & " last seen " & getIniFile("" & words(0) & ".txt",GetIniFile("" & words(0) & ".txt",words(2),"Host",""),"Seen","") & "",ServerNumber End If Else SendCommand "/notice " & Nickname & " Error: No Permission",ServerNumber End If Case "registration" If Not GetIniFile("" & words(0) & ".txt",Getidentifier("$mask(" & Nickname & "!" & Host & ",2)"),"Host","")=Getidentifier("$mask(" & Nickname & "!" & Host & ",2)") then SendCommand "/notice " & Nickname & " Error: No Permission",ServerNumber ElseIf Mid(Message,Len(Words(0)) -- Len(Words(1)) -- 3)="" then Sendcommand "/notice " & nickname & " Please see help information for this command",ServerNumber ElseIf Not getIniFile("" & words(0) & ".txt",Getidentifier("$mask(" & Nickname & "!" & Host & ",2)"),"Protect","")="Yes" then SendCommand "/notice " & Nickname & " Error: Not a channel owner!",ServerNumber ElseIf Lcase(words(2))="1" then If GetIniFile("" & words(0) & ".txt","Register","Allowed","")="Yes" then SendCommand "/notice " & Nickname & " Error: Automatic registration is already enabled",ServerNumber Else writeIniFile"" & words(0) & ".txt","Register","Allowed","Yes" SendCommand "/notice " & Nickname & " Automatic registration is now on",ServerNumber End if ElseIf Lcase(words(2))="0" then If GetIniFile("" & words(0) & ".txt","Register","Allowed","")="No" then SendCommand "/notice " & Nickname & " Error: Automatic registration is already disabled",ServerNumber Else writeIniFile"" & words(0) & ".txt","Register","Allowed","No" SendCommand "/notice " & Nickname & " Automatic registration is now off",ServerNumber End if End If Case "flip" If not GetIniFile("" & words(0) & ".txt",Getidentifier("$mask(" & Nickname & "!" & Host & ",2)"),"Protect","")="Yes" then SendCommand "/notice " & Nickname & " Cannot flip! Reason: Not a channel owner",ServerNumber ElseIf Mid(Message,Len(Words(0)) -- Len(Words(1)) -- 3)="" then Sendcommand "/notice " & Nickname & " Error: Please state a user",ServerNumber ElseIf Words(2)=GetIdentifier("$Me",ServerNumber) then SendCommand "/notice " & Nickname & " Error: Error: No permission",ServerNumber ElseIf not GetIniFile("" & words(0) & ".txt",GetIdentifier("$mask($nick(" & words(0) & "," & words(2) & ").mask,2)",ServerNumber),"Host","")=GetIdentifier("$mask($nick(" & words(0) & "," & words(2) & ").mask,2)",ServerNumber) then SendCommand "/notice " & Nickname & " Error: " & words(2) & " is not a registered user!",ServerNumber ElseIf IsOp(words(2),words(0),ServerNumber) or IsVoice(words(2),words(0),servernumber) then SendCommand "/mode " & words(0) & " -ov " & words(2) & " " & words(2) & " ",ServerNumber ElseIf GetIniFile("" & words(0) & ".txt",GetIdentifier("$mask($nick(" & words(0) & "," & words(2) & ").mask,2)",ServerNumber),"Admin","")="Yes" then If not GetIniFile("" & words(0) & ".txt","op","Set","")="0" or GetIniFile("" & words(0) & ".txt",GetIdentifier("$mask($nick(" & words(0) & "," & words(2) & ").mask,2)",ServerNumber),"Protect","")="Yes" then SendCommand "/mode " & words(0) & " +o " & words(2) & "",ServerNumber Elseif not IsVoice(words(2),words(0),ServerNumber) then SendCommand "/mode " & words(0) & " +v " & words(2) & "",ServerNumber End If ElseIf GetIniFile("" & words(0) & ".txt",GetIdentifier("$mask($nick(" & words(0) & "," & words(2) & ").mask,2)",ServerNumber),"Mod","")="Yes" then If GetIniFile("" & words(0) & ".txt","op","Set","")="2" then SendCommand "/mode " & words(0) & " +o " & words(2) & "",ServerNumber Elseif not IsVoice(words(2),words(0),ServerNumber) then SendCommand "/mode " & words(0) & " +v " & words(2) & "",ServerNumber End If Else SendCommand "/mode " & words(0) & " +v " & words(2) & "",ServerNumber End If Case "fix" If not GetIniFile("" & words(0) & ".txt",Getidentifier("$mask(" & Nickname & "!" & Host & ",2)"),"Mod","")="Yes" then SendCommand "/notice " & Nickname & " Cannot fix! Reason: Not a channel moderator",ServerNumber ElseIf Mid(Message,Len(Words(0)) -- Len(Words(1)) -- 3)="" then Sendcommand "/notice " & Nickname & " Error: Please state a user",ServerNumber ElseIf not GetIniFile("" & words(0) & ".txt",GetIdentifier("$mask($nick(" & words(0) & "," & words(2) & ").mask,2)",ServerNumber),"Host","")=GetIdentifier("$mask($nick(" & words(0) & "," & words(2) & ").mask,2)",ServerNumber) then If IsOp(Words(2),Words(0),ServerNumber) or isvoice(Words(2),Words(0),ServerNumber) then SendCommand "/mode " & words(0) & " -ov " & words(2) & " " & words(2) & "",ServerNumber Else SendCommand "/notice " & Nickname & " Error: This user is at their appropriate user settings!",ServerNumber End if ElseIf GetIniFile("" & words(0) & ".txt",GetIdentifier("$mask($nick(" & words(0) & "," & words(2) & ").mask,2)",ServerNumber),"Admin","")="Yes" then If not GetIniFile("" & words(0) & ".txt","op","Set","")="0" or GetIniFile("" & words(0) & ".txt",GetIdentifier("$mask($nick(" & words(0) & "," & words(2) & ").mask,2)",ServerNumber),"Protect","")="Yes" then If Not IsOp(words(2),words(0),ServerNumber) then SendCommand "/mode " & words(0) & " +o " & words(2) & "",ServerNumber Else SendCommand "/notice " & Nickname & " Error: This user is at their appropriate user settings!",ServerNumber End If ElseIf IsOp(words(2),words(0),ServerNumber) and GetIniFile("" & words(0) & ".txt","op","Set","")="0" and not GetIniFile("" & words(0) & ".txt",GetIdentifier("$mask($nick(" & words(0) & "," & words(2) & ").mask,2)",ServerNumber),"Protect","")="Yes" then SendCommand "/mode " & words(0) & " -o+v " & words(2) & " " & words(2) & "",ServerNumber Elseif not IsVoice(words(2),words(0),ServerNumber) then SendCommand "/mode " & words(0) & " +v " & words(2) & "",ServerNumber Else SendCommand "/notice " & Nickname & " Error: This user is at their appropriate user settings!",ServerNumber End If ElseIf GetIniFile("" & words(0) & ".txt",GetIdentifier("$mask($nick(" & words(0) & "," & words(2) & ").mask,2)",ServerNumber),"Mod","")="Yes" then If GetIniFile("" & words(0) & ".txt","op","Set","")="2" and not IsOp (words(2),words(0),ServerNumber) then SendCommand "/mode " & words(0) & " +o " & words(2) & "",ServerNumber ElseIf IsOp(words(2),words(0),ServerNumber) and not GetIniFile("" & words(0) & ".txt","op","Set","")="2" then SendCommand "/mode " & words(0) & " -o+v " & words(2) & " " & words(2) & "",ServerNumber Elseif not IsVoice(words(2),words(0),ServerNumber) then SendCommand "/mode " & words(0) & " +v " & words(2) & "",ServerNumber Else SendCommand "/notice " & Nickname & " Error: This user is at their appropriate user settings!",ServerNumber End If ElseIf IsOp(words(2),words(0),ServerNumber) then SendCommand "/mode " & words(0) & " -o+v " & words(2) & " " & words(2) & "",ServerNumber ElseIf not IsVoice(words(2),words(0),ServerNumber) then SendCommand "/mode " & words(0) & " +v " & words(2) & "",ServerNumber Else SendCommand "/notice " & Nickname & " Error: This user is at their appropriate user settings!",ServerNumber End If Case "sync" If not GetIniFile("" & words(0) & ".txt",Getidentifier("$mask(" & Nickname & "!" & Host & ",2)"),"Mod","") ="Yes" then SendCommand "/notice " & Nickname & " Error: No permission!",ServerNumber Else Num = "0" Active ="0" SPcount = Getidentifier("$nick(" & words(0) & ",0),ServerNumber") Do while not Num = SPcount -- 1 Num = Num -- 1 Sname = Getidentifier("$nick(" & words(0) & "," & Num & "),ServerNumber") Shost = GetIdentifier("$mask($nick(" & words(0) & "," & Sname & ").mask,2)",ServerNumber) If Not Sname="$null" then If IsOp(Sname,words(0),ServerNumber) then If not GetIniFile("" & words(0) & ".txt",Shost,"Host","")=Shost then WriteIniFile"" & words(0) & ".txt","Sync","Throw",GetIniFile("" & words(0) & ".txt","Sync","Throw","") + " " & Sname & "" Writeinifile"" & words(0) & ".txt","Sync","Throwtype",GetIniFile("" & words(0) & ".txt","Sync","Throwtype","") + "-o" Active = Active -- 1 ElseIf GetIniFile("" & words(0) & ".txt",Shost,"Host","")=Shost and not GetIniFile("" & words(0) & ".txt",Shost,"Mod","")="Yes" then WriteIniFile"" & words(0) & ".txt","Sync","Throw",GetIniFile("" & words(0) & ".txt","Sync","Throw","") + " " & Sname & "" Writeinifile"" & words(0) & ".txt","Sync","Throwtype",GetIniFile("" & words(0) & ".txt","Sync","Throwtype","") + "-o" Active = Active -- 1 ElseIf GetIniFile("" & words(0) & ".txt",Shost,"Mod","")="Yes" and not GetIniFile("" & words(0) & ".txt",Shost,"Admin","")="Yes" and not GetIniFile("" & words(0) & ".txt","op","Set","")="2" then WriteIniFile"" & words(0) & ".txt","Sync","Throw",GetIniFile("" & words(0) & ".txt","Sync","Throw","") + " " & Sname & "" Writeinifile"" & words(0) & ".txt","Sync","Throwtype",GetIniFile("" & words(0) & ".txt","Sync","Throwtype","") + "-o" Active = Active -- 1 ElseIf GetIniFile("" & words(0) & ".txt",Shost,"Admin","")="Yes" and not GetIniFile("" & words(0) & ".txt",Shost,"Protect","")="Yes" and GetIniFile("" & words(0) & ".txt","op","Set","")="0" then WriteIniFile"" & words(0) & ".txt","Sync","Throw",GetIniFile("" & words(0) & ".txt","Sync","Throw","") + " " & Sname & "" Writeinifile"" & words(0) & ".txt","Sync","Throwtype",GetIniFile("" & words(0) & ".txt","Sync","Throwtype","") + "-o" Active = Active -- 1 End If End If If isvoice(Sname,words(0),ServerNumber) and not GetIniFile("" & words(0) & ".txt",Shost,"Host","")=Shost then WriteIniFile"" & words(0) & ".txt","Sync","Throw",GetIniFile("" & words(0) & ".txt","Sync","Throw","") + " " & Sname & "" Writeinifile"" & words(0) & ".txt","Sync","Throwtype",GetIniFile("" & words(0) & ".txt","Sync","Throwtype","") + "-v" Active = Active -- 1 End If If not IsOp(Sname,words(0),ServerNumber) then If GetIniFile("" & words(0) & ".txt",Shost,"Mod","")="Yes" and GetIniFile("" & words(0) & ".txt","op","Set","")="2" then WriteIniFile"" & words(0) & ".txt","Sync","Throw",GetIniFile("" & words(0) & ".txt","Sync","Throw","") + " " & Sname & "" Writeinifile"" & words(0) & ".txt","Sync","Throwtype",GetIniFile("" & words(0) & ".txt","Sync","Throwtype","") + "+o" Active = Active -- 1 ElseIf GetIniFile("" & words(0) & ".txt",Shost,"Admin","")="Yes" and not GetIniFile("" & words(0) & ".txt",Shost,"Protect","")="Yes" and not GetIniFile("" & words(0) & ".txt","op","Set","")="0" then WriteIniFile"" & words(0) & ".txt","Sync","Throw",GetIniFile("" & words(0) & ".txt","Sync","Throw","") + " " & Sname & "" Writeinifile"" & words(0) & ".txt","Sync","Throwtype",GetIniFile("" & words(0) & ".txt","Sync","Throwtype","") + "+o" Active = Active -- 1 ElseIf GetIniFile("" & words(0) & ".txt",Shost,"Protect","")="Yes" then WriteIniFile"" & words(0) & ".txt","Sync","Throw",GetIniFile("" & words(0) & ".txt","Sync","Throw","") + " " & Sname & "" Writeinifile"" & words(0) & ".txt","Sync","Throwtype",GetIniFile("" & words(0) & ".txt","Sync","Throwtype","") + "+o" Active = Active -- 1 End If End If If not isvoice(Sname,words(0),ServerNumber) and GetIniFile("" & words(0) & ".txt",Shost,"Host","")=Shost then If GetIniFile("" & words(0) & ".txt",Shost,"Admin","")="Yes" then If not GetIniFile("" & words(0) & ".txt",Shost,"Protect","")="Yes" and GetIniFile("" & words(0) & ".txt","op","Set","")="0" then WriteIniFile"" & words(0) & ".txt","Sync","Throw",GetIniFile("" & words(0) & ".txt","Sync","Throw","") + " " & Sname & "" Writeinifile"" & words(0) & ".txt","Sync","Throwtype",GetIniFile("" & words(0) & ".txt","Sync","Throwtype","") + "+v" Active = Active -- 1 End If ElseIf GetIniFile("" & words(0) & ".txt",Shost,"Mod","")="Yes" then If not GetIniFile("" & words(0) & ".txt",Shost,"Admin","")="Yes" and not GetIniFile("" & words(0) & ".txt","op","Set","")="2" then WriteIniFile"" & words(0) & ".txt","Sync","Throw",GetIniFile("" & words(0) & ".txt","Sync","Throw","") + " " & Sname & "" Writeinifile"" & words(0) & ".txt","Sync","Throwtype",GetIniFile("" & words(0) & ".txt","Sync","Throwtype","") + "+v" Active = Active -- 1 End If ElseIf GetIniFile("" & words(0) & ".txt",Shost,"Host","")=Shost then WriteIniFile"" & words(0) & ".txt","Sync","Throw",GetIniFile("" & words(0) & ".txt","Sync","Throw","") + " " & Sname & "" Writeinifile"" & words(0) & ".txt","Sync","Throwtype",GetIniFile("" & words(0) & ".txt","Sync","Throwtype","") + "+v" Active = Active -- 1 End If If Active = "5" or Active = "6" then SendCommand "/mode " & words(0) & " " & GetIniFile("" & words(0) & ".txt","Sync","Throwtype","") & " " & GetIniFile("" & words(0) & ".txt","Sync","Throw","") & "",ServerNumber Writeinifile"" & words(0) & ".txt","Sync","Throwtype","" WriteIniFile"" & words(0) & ".txt","Sync","Throw","" Active = "0" End If End If ElseIf not GetIniFile("" & words(0) & ".txt","Sync","Throwtype","")="" then SendCommand "/mode " & words(0) & " " & GetIniFile("" & words(0) & ".txt","Sync","Throwtype","") & " " & GetIniFile("" & words(0) & ".txt","Sync","Throw","") & "",ServerNumber Writeinifile"" & words(0) & ".txt","Sync","Throwtype","" WriteIniFile"" & words(0) & ".txt","Sync","Throw","" Active = "0" SendCommand "/notice " & Nickname & " The list is up to date",ServerNumber Else SendCommand "/notice " & Nickname & " The list is up to date",ServerNumber End If Loop End If Case "move" Pass = Getinifile("" & words(0) & ".txt","Move","Pass","") If GetIniFile("" & Words(0) & ".txt",Getidentifier("$mask(" & Nickname & "!" & Host & ",2)"),"Protect","") ="Yes" then If Mid(Message,Len(Words(0)) -- Len(Words(1)) -- 3)="" then Sendcommand "/notice " & Nickname & " Error: Please state " & Tool & "Move ",ServerNumber ElseIf Mid(Message,Len(Words(0)) -- Len(Words(1)) -- Len(Words(2)) -- 4)="" then Sendcommand "/notice " & Nickname & " Error: Please state " & Tool & "Move ",ServerNumber ElseIf GetIniFile("" & Words(0) & ".txt",GetIdentifier("$mask($nick(" & Words(0) & "," & words(2) & ").mask,2)",ServerNumber),"Admin","")="" then SendCommand "/notice " & Nickname & " User " & words(2) & " does not exist",ServerNumber ElseIf words(2)=Getidentifier("$me",ServerNumber) or words(3)=Getidentifier("$me",ServerNumber) then SendCommand "/notice " & Nickname & " Error: You cannot perform this action!",Servernumber ElseIf words(2)=Nickname and GetIniFile("" & Words(0) & ".txt",Getidentifier("$mask(" & Nickname & "!" & Host & ",2)"),"Special","") ="Yes" then SendCommand "/notice " & Nickname & " Error: You cannot perform this action!",Servernumber ElseIf Left(GetIniFile("" & Words(0) & ".txt",GetIdentifier("$mask($nick(" & Words(0) & "," & words(2) & ").mask,2)",ServerNumber),"Host",""),1)="s" or Left(GetIniFile("" & Words(0) & ".txt",GetIniFile("" & Words(0) & ".txt",words(2),"Host",""),"Host",""),1)="s" then SendCommand "/notice " & Nickname & " " & words(2) & " is suspended!",ServerNumber ElseIf GetIdentifier("$mask($nick(" & Words(0) & "," & words(3) & ").mask,2)",ServerNumber)="$null" then SendCommand "/notice " & Nickname & " Error: You can only move an account to an active user!",ServerNumber ElseIf words(3)=Nickname then SendCommand "/notice " & Nickname & " Error: You cannot overwrite your own profile!",Servernumber ElseIf GetIniFile("" & Words(0) & ".txt",GetIdentifier("$mask($nick(" & Words(0) & "," & words(2) & ").mask,2)",ServerNumber),"Host","")=GetIdentifier("$mask($nick(" & Words(0) & "," & words(3) & ").mask,2)",ServerNumber) then SendCommand "/notice " & 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)) -- Len(Words(3)) -- 5)="" and not Mid(Message,Len(Words(0)) -- Len(Words(1)) -- Len(Words(2)) -- Len(Words(3)) -- 5) = Pass and not Pass = "" then Sendcommand "/notice " & Nickname & " Error: Incorrect confirmation pass",ServerNumber ElseIf not GetIniFile("" & words(0) & ".txt",GetIdentifier("$mask($nick(" & words(0) & "," & words(3) & ").mask,2)",ServerNumber),"Admin","")="" then If not GetIniFile("" & Words(0) & ".txt",GetIdentifier("$mask($nick(" & Words(0) & "," & words(2) & ").mask,2)",ServerNumber),"Host","")="" then Snick=GetIniFile("" & Words(0) & ".txt",GetIdentifier("$mask($nick(" & Words(0) & "," & words(2) & ").mask,2)",ServerNumber),"Host","") Else Snick=GetIniFile("" & Words(0) & ".txt",words(2),"Host","") End If Snick2=GetIdentifier("$mask($nick(" & Words(0) & "," & words(3) & ").mask,2)",ServerNumber) If Mid(Message,Len(Words(0)) -- Len(Words(1)) -- Len(Words(2)) -- Len(Words(3)) -- 5) = "" or Pass = "" then Writeinifile"" & words(0) & ".txt","Move","Pass",Getidentifier("$rnd(999999)",ServerNumber) Pass = Getinifile("" & words(0) & ".txt","Move","Pass","") If words(2)=Nickname then SendCommand "/notice " & Nickname & " WARNING: You will lose all bot control in your channel and trade ownership to " & words(3) & "",ServerNumber End If SendCommand "/notice " & Nickname & " User " & words(3) & " has an account which will be overwritten! Please state " & Tool & "Move " & Words(2) & " " & Words(3) & " " & Pass & " to confirm",ServerNumber Elseif words(4) = Pass then Sendcommand "/! Onmove " & Nickname & "|" & words(0) & "|" & Snick & "|" & Snick2 & "|" & ServerNumber & "" End If ElseIf not GetIniFile("" & Words(0) & ".txt",GetIniFile("" & Words(0) & ".txt",words(3),"Host",""),"Host","")="" and not GetIniFile("" & Words(0) & ".txt",GetIniFile("" & Words(0) & ".txt",words(3),"Host",""),"Host","") = GetIniFile("" & Words(0) & ".txt",GetIdentifier("$mask($nick(" & Words(0) & "," & words(3) & ").mask,2)",ServerNumber),"Host","") and not words(2)=words(3) then SendCommand "/notice " & Nickname & " Error: " & words(3) & " is using a registered nickname. " & words(3) & " must change nicknames, authenticate or use the original account holder nickname",ServerNumber Else If not GetIniFile("" & Words(0) & ".txt",GetIdentifier("$mask($nick(" & Words(0) & "," & words(2) & ").mask,2)",ServerNumber),"Host","")="" then Snick=GetIniFile("" & Words(0) & ".txt",GetIdentifier("$mask($nick(" & Words(0) & "," & words(2) & ").mask,2)",ServerNumber),"Host","") Else Snick=GetIniFile("" & Words(0) & ".txt",words(2),"Host","") End If Snick2=GetIdentifier("$mask($nick(" & Words(0) & "," & words(3) & ").mask,2)",ServerNumber) If Mid(Message,Len(Words(0)) -- Len(Words(1)) -- Len(Words(2)) -- Len(Words(3)) -- 5) = "" or Pass = "" then Writeinifile"" & words(0) & ".txt","Move","Pass",Getidentifier("$rnd(999999)",ServerNumber) Pass = Getinifile("" & words(0) & ".txt","Move","Pass","") If words(2)=Nickname then SendCommand "/notice " & Nickname & " WARNING: You will lose all bot control in your channel and trade ownership to " & words(3) & "",ServerNumber End If SendCommand "/notice " & Nickname & " User " & words(3) & " does not have an account and will gain only permissions from " & words(2) & ". Please state " & Tool & "Move " & Words(2) & " " & Words(3) & " " & Pass & " to confirm",ServerNumber Elseif words(4) = Pass then Sendcommand "/! Onmove " & Nickname & "|" & words(0) & "|" & Snick & "|" & Snick2 & "|" & ServerNumber & "" End If End If Else SendCommand "/notice " & Nickname & " Error: Not a channel owner!",ServerNumber End If Case "trefresh" If GetIniFile("" & Words(0) & ".txt",Getidentifier("$mask(" & Nickname & "!" & Host & ",2)"),"Host","")=Getidentifier("$mask(" & Nickname & "!" & Host & ",2)") then If getIniFile("" & Words(0) & ".txt",Getidentifier("$mask(" & Nickname & "!" & Host & ",2)"),"Mod","")="Yes" then SendCommand "/topic " & Words(0) & " " & GetIniFile("" & Words(0) & ".txt","Topic","Ident","") & " " & GetIniFile("" & Words(0) & ".txt","Topic","Topic","") & "",ServerNumber Else SendCommand "/notice " & Nickname & " Error: Not a channel moderator!",ServerNumber End If Else SendCommand "/notice " & Nickname & " Error: No Permission",ServerNumber End If Case "me" If Left(GetIniFile("" & Words(0) & ".txt",Getidentifier("$mask(" & Nickname & "!" & Host & ",2)"),"Host",""),1)="s" then SendCommand "/notice " & Nickname & " Your account is currently suspended!",ServerNumber ElseIf GetIniFile("" & Words(0) & ".txt",Getidentifier("$mask(" & Nickname & "!" & Host & ",2)"),"Host","")=Getidentifier("$mask(" & Nickname & "!" & Host & ",2)") then If Not GetIniFile("" & Words(0) & ".txt",Getidentifier("$mask(" & Nickname & "!" & Host & ",2)"),"Join","")="" and Not Left(GetIniFile("" & Words(0) & ".txt",Getidentifier("$mask(" & Nickname & "!" & Host & ",2)"),"Join",""),1)="&" then SendCommand "/notice " & Nickname & " Join Message: " & GetIniFile("" & Words(0) & ".txt",Getidentifier("$mask(" & Nickname & "!" & Host & ",2)"),"Join","") & "",ServerNumber End If If not GetIniFile("" & Words(0) & ".txt",Getidentifier("$mask(" & Nickname & "!" & Host & ",2)"),"Note","")="" then SendCommand "/notice " & Nickname & " Your note: " & GetIniFile("" & Words(0) & ".txt",Getidentifier("$mask(" & Nickname & "!" & Host & ",2)"),"Note","") & "",ServerNumber End If If getinifile("" & words(0) & ".txt",Getidentifier("$mask(" & Nickname & "!" & Host & ",2)"),"Op","")="Off" then SendCommand "/notice " & Nickname & " Automatic channel op on join is disabled",ServerNumber End If If GetIniFile("" & Words(0) & ".txt",Getidentifier("$mask(" & Nickname & "!" & Host & ",2)"),"Special","")="S" then Spad="-R-" End If SendCommand "/notice " & Nickname & " " & GetIniFile("" & Words(0) & ".txt",Getidentifier("$mask(" & Nickname & "!" & Host & ",2)"),"Nick","") & ": Is a mod= " & getIniFile("" & Words(0) & ".txt",Getidentifier("$mask(" & Nickname & "!" & Host & ",2)"),"Mod","") & " ; Has admin= " & Spad & "" & GetIniFile("" & Words(0) & ".txt",Getidentifier("$mask(" & Nickname & "!" & Host & ",2)"),"Admin","") & " ; Is Protected= " & GetIniFile("" & Words(0) & ".txt",Getidentifier("$mask(" & Nickname & "!" & Host & ",2)"),"Protect","") & " ; Host= " & GetIniFile("" & Words(0) & ".txt",Getidentifier("$mask(" & Nickname & "!" & Host & ",2)"),"Host","") & "",ServerNumber Else SendCommand "/notice " & Nickname & " Error: No Permission",ServerNumber End if Case "note" If GetIniFile("" & words(0) & ".txt",Getidentifier("$mask(" & Nickname & "!" & Host & ",2)"),"Host","")=Getidentifier("$mask(" & Nickname & "!" & Host & ",2)") then If Mid(Message,Len(Words(0)) + Len(Words(1)) -- 3)="" and not GetIniFile("" & words(0) & ".txt",Getidentifier("$mask(" & Nickname & "!" & Host & ",2)"),"Note","")="" then SendCommand "/notice " & Nickname & " Your note has been cleared!",ServerNumber WriteIniFile"" & words(0) & ".txt",Getidentifier("$mask(" & Nickname & "!" & Host & ",2)"),"Note","" ElseIf Mid(Message,Len(Words(0)) + Len(Words(1)) -- 3)="" and GetIniFile("" & words(0) & ".txt",Getidentifier("$mask(" & Nickname & "!" & Host & ",2)"),"Note","")="" then SendCommand "/notice " & Nickname & " Error: Nothing to clear!",ServerNumber Else WriteIniFile"" & words(0) & ".txt",Getidentifier("$mask(" & Nickname & "!" & Host & ",2)"),"Note",Mid(Message,Len(Words(0)) + Len(Words(1)) -- 3) SendCommand "/notice " & Nickname & " Note: " & Mid(Message,Len(Words(0)) + Len(Words(1)) -- 3) & "",ServerNumber End If Else SendCommand "/notice " & Nickname & " Error: No Permission",ServerNumber End If Case "kick", "k" If Mid(Message,Len(Words(0)) -- Len(Words(1)) -- 3)="" and Lcase(words(1))="" & Tool & "kick" then Sendcommand "/notice " & Nickname & " Error: Please state a nickname to kick",ServerNumber Elseif Mid(Message,Len(Words(0)) -- Len(Words(1)) -- 3)="" and Lcase(words(1))="" & Tool & "k" then Sendcommand "/notice " & Nickname & " Error: Please state a nickname to kick",ServerNumber ElseIf words(2)=GetIdentifier("$me",ServerNumber) then SendCommand "/Notice " & Nickname & " Nope :P",ServerNumber ElseIf GetIniFile("" & Words(0) & ".txt",Getidentifier("$mask(" & Nickname & "!" & Host & ",2)"),"Host","")=Getidentifier("$mask(" & Nickname & "!" & Host & ",2)") then If getIniFile("" & Words(0) & ".txt",Getidentifier("$mask(" & Nickname & "!" & Host & ",2)"),"Mod","")="Yes" then If words(2) = Nickname then SendCommand "/kick " & Words(0) & " " & words(2) & " Ha, you kicked yourself...",ServerNumber ElseIf GetIdentifier("$mask($nick(" & Words(0) & "," & words(2) & ").mask,2)",ServerNumber)="$null" then SendCommand "/notice " & Nickname & " Error: This is not an active user!",ServerNumber Elseif GetIniFile("" & Words(0) & ".txt",GetIdentifier("$mask($nick(" & Words(0) & "," & words(2) & ").mask,2)",ServerNumber),"Protect","")="Yes" then SendCommand "/notice " & Nickname & " Sorry, that user is protected",ServerNumber ElseIf getIniFile("" & Words(0) & ".txt",Getidentifier("$mask(" & Nickname & "!" & Host & ",2)"),"Admin","")="No" and getIniFile("" & Words(0) & ".txt",GetIdentifier("$mask($nick(" & Words(0) & "," & words(2) & ").mask,2)",ServerNumber),"Admin","")="Yes" then SendCommand "/notice " & Nickname & " Error: You cannot kick a higher power",ServerNumber ElseIf getIniFile("" & Words(0) & ".txt",Getidentifier("$mask(" & Nickname & "!" & Host & ",2)"),"Mod","")="Yes" and getIniFile("" & Words(0) & ".txt",GetIdentifier("$mask($nick(" & Words(0) & "," & words(2) & ").mask,2)",ServerNumber),"Mod","")="Yes" and not getIniFile("" & Words(0) & ".txt",Getidentifier("$mask(" & Nickname & "!" & Host & ",2)"),"Admin","")="Yes"then SendCommand "/notice " & Nickname & " Error: You cannot kick other mods!",ServerNumber Else SendCommand "/kick " & Words(0) & " " & words(2) & " " & Mid(Message,Len(Words(0)) + Len(Words(1)) + Len(Words(2)) -- 4) & " ~ " & Nickname & "",ServerNumber End If Else SendCommand "/notice " & Nickname & " Error: Not a channel moderator!",ServerNumber End If Else SendCommand "/notice " & Nickname & " Error: No Permission",ServerNumber End if Case "setop" If GetIniFile("" & words(0) & ".txt",Getidentifier("$mask(" & Nickname & "!" & Host & ",2)"),"Protect","") ="Yes" then If Mid(Message,Len(words(0)) -- Len(Words(1)) -- 3) = "" then Sendcommand "/notice " & Nickname & " Error: Please enter/set this mode to either 0,1,2 following the command!",ServerNumber ElseIf Lcase(words(2))="0" then If GetIniFile("" & words(0) & ".txt","op","Set","")="0" then SendCommand "/notice " & Nickname & " Error: Auto op is already set to owner only!",ServerNumber Else writeIniFile"" & words(0) & ".txt","op","Set","0" SendCommand "/notice " & Nickname & " Only channel owner will now get op",ServerNumber End If ElseIf Lcase(words(2))="1" then If GetIniFile("" & words(0) & ".txt","op","Set","")="1" then SendCommand "/notice " & Nickname & " Error: Auto op is already set to admins and higher!",ServerNumber Else writeIniFile"" & words(0) & ".txt","op","Set","1" SendCommand "/notice " & Nickname & " Only channel admins and higher will now get op",ServerNumber End If ElseIf Lcase(words(2))="2" then If GetIniFile("" & words(0) & ".txt","op","Set","")="2" then SendCommand "/notice " & Nickname & " Error: Auto op is already set to moderators and higher!",ServerNumber Else writeIniFile"" & words(0) & ".txt","op","Set","2" SendCommand "/notice " & Nickname & " Warning: Only channel moderators and higher will now get op (Not recommended)",ServerNumber End If End If Else SendCommand "/notice " & Nickname & " Error: Not a channel owner!",ServerNumber End If Case "unban", "ub" If GetIniFile("" & Words(0) & ".txt",Getidentifier("$mask(" & Nickname & "!" & Host & ",2)"),"Host","")=Getidentifier("$mask(" & Nickname & "!" & Host & ",2)") then If Mid(Message,Len(Words(0)) -- Len(Words(1)) -- 3)="" and Lcase(words(1))="" & Tool & "unban" then Sendcommand "/notice " & Nickname & " Error: Please state a nickname to unban",ServerNumber ElseIf Mid(Message,Len(Words(0)) -- Len(Words(1)) -- 3)="" and Lcase(words(1))="" & Tool & "ub" then Sendcommand "/notice " & Nickname & " Error: Please state a nickname to unban",ServerNumber ElseIf getIniFile("" & Words(0) & ".txt",Getidentifier("$mask(" & Nickname & "!" & Host & ",2)"),"Mod","")="Yes" then SendCommand "/mode " & Words(0) & " -b " & words(2) & "",ServerNumber Sendcommand "/notice " & Nickname & " Done",ServerNumber Else SendCommand "/notice " & Nickname & " Error: Not a channel moderator!",ServerNumber End If Else SendCommand "/notice " & Nickname & " Error: No Permission",ServerNumber End if Case "snuggle" If GetIniFile("" & words(0) & ".txt",Getidentifier("$mask(" & Nickname & "!" & Host & ",2)"),"Host","")=Getidentifier("$mask(" & Nickname & "!" & Host & ",2)") then If GetIdentifier("$mask($nick(" & words(0) & "," & words(2) & ").mask,2)",ServerNumber)="$null" then SendCommand "/notice " & Nickname & " D: But this person isn't here! Or you mispelled the nick...",ServerNumber Else SendCommand "/describe " & words(0) & " snuggles " & words(2) & "",ServerNumber End If Else SendCommand "/notice " & Nickname & " Ew: Not registered!",ServerNumber End if Case "undoban", "udb", "sorry" If getIniFile("" & words(0) & ".txt",Getidentifier("$mask(" & Nickname & "!" & Host & ",2)"),"Mod","")="Yes" and getIniFile("" & words(0) & ".txt",Getidentifier("$mask(" & Nickname & "!" & Host & ",2)"),"Protect","")="No" then If not GetIniFile("" & words(0) & ".txt","Lastban","Ban","")="" then If not GetIniFile("" & words(0) & ".txt","Lastban","Bani","")= "" then Sendcommand "/notice " & Nickname & " Error: No permission",ServerNumber Else Sendcommand "/mode " & Words(0) & " -b *" & GetIniFile("" & words(0) & ".txt","Lastban","Ban","") & "*",ServerNumber Sendcommand "/notice " & Nickname & " " & GetIniFile("" & words(0) & ".txt","Lastban","Ban","") & " removed",ServerNumber WriteIniFile"" & words(0) & ".txt","Lastban","Ban","" End If Else SendCommand "/notice " & Nickname & " Error: No recent ban!",ServerNumber End If Elseif getIniFile("" & words(0) & ".txt",Getidentifier("$mask(" & Nickname & "!" & Host & ",2)"),"Protect","")="Yes" then If not GetIniFile("" & words(0) & ".txt","Lastban","Ban","")="" then If not GetIniFile("" & words(0) & ".txt","Lastban","Bani","")= "" then Sendcommand "/mode " & Words(0) & " -b *" & GetIniFile("" & words(0) & ".txt","Lastban","Ban","") & "*",ServerNumber Sendcommand "/notice " & Nickname & " " & GetIniFile("" & words(0) & ".txt","Lastban","Ban","") & " removed",ServerNumber Writeinifile"" & words(0) & ".txt","Blist",GetIniFile("" & words(0) & ".txt","Lastban","Bani",""),"" Writeinifile"" & words(0) & ".txt","Blist","" & GetIniFile("" & words(0) & ".txt","Lastban","Bani","") & "i","" WriteIniFile"" & words(0) & ".txt","Lastban","Ban","" WriteIniFile"" & words(0) & ".txt","Lastban","Bani","" Else Sendcommand "/mode " & Words(0) & " -b *" & GetIniFile("" & words(0) & ".txt","Lastban","Ban","") & "*",ServerNumber Sendcommand "/notice " & Nickname & " " & GetIniFile("" & words(0) & ".txt","Lastban","Ban","") & " removed",ServerNumber WriteIniFile"" & words(0) & ".txt","Lastban","Ban","" End If Else SendCommand "/notice " & Nickname & " Error: No recent ban!",ServerNumber End If Else Sendcommand "/notice " & Nickname & " Error: No permission",ServerNumber End If Case "user" If GetIniFile("" & words(0) & ".txt",Getidentifier("$mask(" & Nickname & "!" & Host & ",2)"),"Host","")=Getidentifier("$mask(" & Nickname & "!" & Host & ",2)") then If Mid(Message,Len(Words(0)) -- Len(Words(1)) -- 3)="" then Sendcommand "/notice " & nickname & " Error: Please state something",ServerNumber ElseIf not GetIniFile("" & words(0) & ".txt",GetIdentifier("$mask($nick(" & words(0) & "," & words(2) & ").mask,2)",ServerNumber),"Host","")= "" and not GetIniFile("" & words(0) & ".txt",GetIdentifier("$mask($nick(" & words(0) & "," & words(2) & ").mask,2)",ServerNumber),"Admin","")= "" then If not Left(GetIniFile("" & words(0) & ".txt",GetIdentifier("$mask($nick(" & words(0) & "," & words(2) & ").mask,2)",ServerNumber),"Host",""),1)="s" then If Not GetIniFile("" & words(0) & ".txt",GetIdentifier("$mask($nick(" & words(0) & "," & words(2) & ").mask,2)",ServerNumber),"Join","")="" and not Left(GetIniFile("" & words(0) & ".txt",GetIdentifier("$mask($nick(" & words(0) & "," & words(2) & ").mask,2)",ServerNumber),"Join",""),1)="&" then SendCommand "/notice " & Nickname & " Join Message: " & GetIniFile("" & words(0) & ".txt",GetIdentifier("$mask($nick(" & words(0) & "," & words(2) & ").mask,2)",ServerNumber),"Join","") & "",ServerNumber End If If GetIniFile("" & words(0) & ".txt",GetIdentifier("$mask($nick(" & words(0) & "," & words(2) & ").mask,2)",ServerNumber),"Special","")="S" then Spad="-R-" End If SendCommand "/notice " & Nickname & " " & GetIniFile("" & words(0) & ".txt",GetIdentifier("$mask($nick(" & words(0) & "," & words(2) & ").mask,2)",ServerNumber),"Nick","") & ": Is a mod= " & getIniFile("" & words(0) & ".txt",GetIdentifier("$mask($nick(" & words(0) & "," & words(2) & ").mask,2)",ServerNumber),"Mod","") & " ; Has admin= " & Spad & "" & GetIniFile("" & words(0) & ".txt",GetIdentifier("$mask($nick(" & words(0) & "," & words(2) & ").mask,2)",ServerNumber),"Admin","") & " ; Is protected= " & GetIniFile("" & words(0) & ".txt",GetIdentifier("$mask($nick(" & words(0) & "," & words(2) & ").mask,2)",ServerNumber),"Protect","") & " ; Host= " & GetIniFile("" & words(0) & ".txt",GetIdentifier("$mask($nick(" & words(0) & "," & words(2) & ").mask,2)",ServerNumber),"Host","") & "",ServerNumber Else SendCommand "/notice " & Nickname & " This account is currently suspended!",ServerNumber End If ElseIf Not GetIniFile("" & words(0) & ".txt",GetIniFile("" & words(0) & ".txt",words(2),"Host",""),"Host","")="" and not GetIniFile("" & words(0) & ".txt",GetIniFile("" & words(0) & ".txt",words(2),"Host",""),"Admin","")="" then If not Left(GetIniFile("" & words(0) & ".txt",GetIniFile("" & words(0) & ".txt",words(2),"Host",""),"Host",""),1)="s" then If Not GetIniFile("" & words(0) & ".txt",GetIniFile("" & words(0) & ".txt",words(2),"Host",""),"Join","")="" and not Left(GetIniFile("" & words(0) & ".txt",GetIniFile("" & words(0) & ".txt",words(2),"Host",""),"Join",""),1)="&" then SendCommand "/notice " & Nickname & " Join Message: " & GetIniFile("" & words(0) & ".txt",GetIniFile("" & words(0) & ".txt",words(2),"Host",""),"Join","") & "",ServerNumber End If If not GetIdentifier("$mask($nick(" & words(0) & "," & words(2) & ").mask,2)",ServerNumber)="$null" then SendCommand "/notice " & Nickname & " Warning: This active user may be a fake or is not authed!",ServerNumber End If If GetIniFile("" & words(0) & ".txt",GetIniFile("" & words(0) & ".txt",words(2),"Host",""),"Special","")="S" then Spad="-R-" End If SendCommand "/notice " & Nickname & " " & GetIniFile("" & words(0) & ".txt",GetIniFile("" & words(0) & ".txt",words(2),"Host",""),"Nick","") & ": Is a mod= " & getIniFile("" & words(0) & ".txt",GetIniFile("" & words(0) & ".txt",words(2),"Host",""),"Mod","") & " ; Has admin= " & Spad & "" & GetIniFile("" & words(0) & ".txt",GetIniFile("" & words(0) & ".txt",words(2),"Host",""),"Admin","") & " ; Is protected= " & GetIniFile("" & words(0) & ".txt",GetIniFile("" & words(0) & ".txt",words(2),"Host",""),"Protect","") & " ; Host= " & GetIniFile("" & words(0) & ".txt",words(2),"Host","") & "",ServerNumber Else SendCommand "/notice " & Nickname & " This account is currently suspended!",ServerNumber End if Else Ncheck = Getidentifier("$lines(" & words(0) & ".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(" & words(0) & ".txt," & Ncheck & ")",ServerNumber),5),5)="@" then Nhost=Mid(Left(Getidentifier("$read(" & words(0) & ".txt," & Ncheck & ")",ServerNumber),len(Getidentifier("$read(" & words(0) & ".txt," & Ncheck & ")",ServerNumber)) - 1),2) Nname=GetIniFile("" & words(0) & ".txt",Nhost,"Nick","") If InStr(Lcase(words(2)),Lcase(Nname)) and not Left(Nname,12) = "Unregistered" and not Nname = "" then Ngen= Ngen + " - " & Nname & "" Nfound = Nfound - 1 ElseIf InStr(Lcase(Nname),Lcase(words(2))) and not Left(Nname,12) = "Unregistered" then Ngen= Ngen + " - " & Nname & "" Nfound = Nfound - 1 ElseIf InStr(Lcase(words(2)),Lcase(Nhost)) and not Left(Nname,12) = "Unregistered" and not Nname = "" then Ngen= Ngen + " - " & Nname & "" Nfound = Nfound - 1 ElseIf InStr(Lcase(Nhost),Lcase(words(2))) 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 Sendcommand "/notice " & Nickname & " No specific user found. Searched " & Nfound & ": " & Mid(Ngen,3) & "",ServerNumber Else Sendcommand "/notice " & Nickname & " No users found",ServerNumber End If End If Loop End If Else SendCommand "/notice " & Nickname & " Error: No Permission",ServerNumber End If Case "ban", "b" If Mid(Message,Len(Words(0)) -- Len(Words(1)) -- 3)="" and Lcase(words(1))="" & Tool & "ban" then Sendcommand "/notice " & Nickname & " Error: Please state a nickname to ban",ServerNumber ElseIf Mid(Message,Len(Words(0)) -- Len(Words(1)) -- 3)="" and Lcase(words(1))="" & Tool & "b" then Sendcommand "/notice " & Nickname & " Error: Please state a nickname to ban",ServerNumber ElseIf words(2)=GetIdentifier("$me",ServerNumber) then SendCommand "/Notice " & Nickname & " Nope :P",ServerNumber ElseIf GetIniFile("" & Words(0) & ".txt",Getidentifier("$mask(" & Nickname & "!" & Host & ",2)"),"Mod","")="Yes" then If GetIniFile("" & Words(0) & ".txt",GetIdentifier("$mask($nick(" & Words(0) & "," & words(2) & ").mask,2)",ServerNumber),"Protect","")="Yes" then SendCommand "/notice " & Nickname & " " & words(2) & " is protected!",ServerNumber ElseIf GetIdentifier("$mask($nick(" & Words(0) & "," & words(2) & ").mask,2)",ServerNumber)="$null" then SendCommand "/notice " & Nickname & " Error: This is not an active user!",ServerNumber ElseIf getIniFile("" & Words(0) & ".txt",Getidentifier("$mask(" & Nickname & "!" & Host & ",2)"),"Admin","")="Yes" and getIniFile("" & Words(0) & ".txt",GetIdentifier("$mask($nick(" & Words(0) & "," & words(2) & ").mask,2)",ServerNumber),"Admin","")="Yes" and not getIniFile("" & Words(0) & ".txt",Getidentifier("$mask(" & Nickname & "!" & Host & ",2)"),"Protect","")="Yes" then SendCommand "/notice " & Nickname & " Error: You cannot ban other admins!",ServerNumber ElseIf getIniFile("" & Words(0) & ".txt",Getidentifier("$mask(" & Nickname & "!" & Host & ",2)"),"Mod","")="Yes" and not getIniFile("" & Words(0) & ".txt",GetIdentifier("$mask($nick(" & Words(0) & "," & words(2) & ").mask,2)",ServerNumber),"Admin","")="Yes" and not getIniFile("" & Words(0) & ".txt",Getidentifier("$mask(" & Nickname & "!" & Host & ",2)"),"Admin","")="Yes" then SendCommand "/notice " & Nickname & " Error: You cannot ban a higher power",ServerNumber ElseIf getIniFile("" & Words(0) & ".txt",Getidentifier("$mask(" & Nickname & "!" & Host & ",2)"),"Mod","")="Yes" and getIniFile("" & Words(0) & ".txt",GetIdentifier("$mask($nick(" & Words(0) & "," & words(2) & ").mask,2)",ServerNumber),"Mod","")="Yes" and not getIniFile("" & Words(0) & ".txt",Getidentifier("$mask(" & Nickname & "!" & Host & ",2)"),"Admin","")="Yes" then SendCommand "/notice " & Nickname & " Error: You cannot ban other mods!",ServerNumber Else WriteIniFile"" & Channel & ".txt","Lastban","Ban",Nickname SendCommand "/mode " & Words(0) & " +b " & words(2) & "",ServerNumber SendCommand "/kick " & Words(0) & " " & words(2) & " " & Mid(Message,Len(Words(0)) + Len(Words(1)) + Len(Words(2)) -- 4) & " ~ " & Nickname & "",ServerNumber End If Else SendCommand "/notice " & Nickname & " Error: Not a channel moderator!",ServerNumber End If Case "suspend" If GetIniFile("" & Words(0) & ".txt",Getidentifier("$mask(" & Nickname & "!" & Host & ",2)"),"Admin","") ="Yes" then If Mid(Message,Len(words(0)) -- Len(Words(1)) -- 3) = "" then Sendcommand "/notice " & Nickname & " Error: Please state a user to suspend",ServerNumber ElseIf GetIniFile("" & Words(0) & ".txt",GetIdentifier("$mask($nick(" & Words(0) & "," & words(2) & ").mask,2)",ServerNumber),"Nick","")="" and GetIniFile("" & Words(0) & ".txt",words(2),"Host","")="" then SendCommand "/notice " & Nickname & " User " & words(2) & " does not exist",ServerNumber ElseIf GetIniFile("" & Channel & ".txt",Getidentifier("$mask(" & Nickname & "!" & Host & ",2)"),"Special","")="S" then SendCommand "/notice " & Nickname & " Sorry, you are restricted from using this command!",ServerNumber Elseif GetIniFile("" & Words(0) & ".txt",GetIdentifier("$mask($nick(" & Words(0) & "," & words(2) & ").mask,2)",ServerNumber),"Admin","") ="Yes" and not GetIniFile("" & Words(0) & ".txt",Getidentifier("$mask(" & Nickname & "!" & Host & ",2)"),"Protect","")="Yes" then SendCommand "/notice " & Nickname & " Error: You cannot suspend other admins!",ServerNumber ElseIf GetIniFile("" & Words(0) & ".txt",GetIniFile("" & Words(0) & ".txt",words(2),"Host",""),"Admin","")="Yes" and not GetIniFile("" & Words(0) & ".txt",Getidentifier("$mask(" & Nickname & "!" & Host & ",2)"),"Protect","")="Yes" then SendCommand "/notice " & Nickname & " Error: You cannot suspend other admins!",ServerNumber ElseIf Left(GetIniFile("" & Words(0) & ".txt",GetIdentifier("$mask($nick(" & Words(0) & "," & words(2) & ").mask,2)",ServerNumber),"Host",""),1)="s" or Left(GetIniFile("" & Words(0) & ".txt",GetIniFile("" & Words(0) & ".txt",words(2),"Host",""),"Host",""),1)="s" then SendCommand "/notice " & Nickname & " Error: This user is already suspended!",ServerNumber ElseIf GetIniFile("" & Words(0) & ".txt",GetIdentifier("$mask($nick(" & Words(0) & "," & words(2) & ").mask,2)",ServerNumber),"Protect","")="Yes" or GetIniFile("" & Words(0) & ".txt",GetIniFile("" & Words(0) & ".txt",words(2),"Host",""),"Protect","")="Yes" then SendCommand "/notice " & Nickname & " " & words(2) & " is protected!",ServerNumber ElseIf not GetIniFile("" & Words(0) & ".txt",GetIniFile("" & Words(0) & ".txt",words(2),"Host",""),"Host","")="" then Banner = GetIniFile("" & Words(0) & ".txt",GetIniFile("" & Words(0) & ".txt",words(2),"Host",""),"Mod","") WriteIniFile"" & Words(0) & ".txt",GetIniFile("" & Words(0) & ".txt",words(2),"Host",""),"Mod","s " & Banner & "" Banner = GetIniFile("" & Words(0) & ".txt",GetIniFile("" & Words(0) & ".txt",words(2),"Host",""),"Admin","") WriteIniFile"" & Words(0) & ".txt",GetIniFile("" & Words(0) & ".txt",words(2),"Host",""),"Admin","s " & Banner & "" Banner = GetIniFile("" & Words(0) & ".txt",GetIniFile("" & Words(0) & ".txt",words(2),"Host",""),"Host","") WriteIniFile"" & Words(0) & ".txt",GetIniFile("" & Words(0) & ".txt",words(2),"Host",""),"Host","s " & Banner & "" SendCommand "/notice " & Nickname & " User suspended!",ServerNumber If IsOp(words(2),words(0),ServerNumber) then sendcommand "/mode " & Words(0) & " -o " & words(2) & "",ServerNumber If IsVoice(words(2),words(0),ServerNumber) then sendcommand "/mode " & Words(0) & " -v " & words(2) & "",ServerNumber Else Banner = Getinifile("" & Words(0) & ".txt",GetIdentifier("$mask($nick(" & Words(0) & "," & words(2) & ").mask,2)",ServerNumber),"Mod","") WriteIniFile"" & Words(0) & ".txt",GetIdentifier("$mask($nick(" & Words(0) & "," & words(2) & ").mask,2)",ServerNumber),"Mod","s " & Banner & "" Banner = Getinifile("" & Words(0) & ".txt",GetIdentifier("$mask($nick(" & Words(0) & "," & words(2) & ").mask,2)",ServerNumber),"Admin","") WriteIniFile"" & Words(0) & ".txt",GetIdentifier("$mask($nick(" & Words(0) & "," & words(2) & ").mask,2)",ServerNumber),"Admin","s " & Banner & "" Banner = GetIdentifier("$mask($nick(" & Words(0) & "," & words(2) & ").mask,2)",ServerNumber) WriteIniFile"" & Words(0) & ".txt",GetIdentifier("$mask($nick(" & Words(0) & "," & words(2) & ").mask,2)",ServerNumber),"Host","s " & Banner & "" SendCommand "/notice " & Nickname & " User suspended!",ServerNumber If IsOp(words(2),Channel,ServerNumber) then sendcommand "/mode " & Words(0) & " -o " & words(2) & "",ServerNumber If IsVoice(words(2),Channel,ServerNumber) then sendcommand "/mode " & Words(0) & " -v " & words(2) & "",ServerNumber End If Else SendCommand "/notice " & Nickname & " Error: Not a channel admin!",ServerNumber End If Case "addban" If not GetIniFile("" & words(0) & ".txt",Getidentifier("$mask(" & Nickname & "!" & Host & ",2)"),"Protect","")="Yes" then SendCommand "/notice " & Nickname & " Error: No permission",ServerNumber Else Bcheck="51" If Mid(Message,Len(Words(0)) -- Len(Words(1)) -- 3)="" then Sendcommand "/notice " & Nickname & " Error: Please state a host or nickname!",SerevrNumber Else Bmsg = words(2) chkme = Getidentifier("$me",ServerNumber) If Instr(Lcase(GetIdentifier("$mask($nick(" & Words(0) & "," & Chkme & ").mask,2)",ServerNumber)),Lcase(Bmsg)) or Bmsg = Chkme then Sendcommand "/notice " & Nickname & " Error: No permission",ServerNumber Exit Sub ElseIf not GetIdentifier("$mask($nick(" & Words(0) & "," & words(2) & ").mask,2)",ServerNumber)="$null" then Bmsg = GetIdentifier("$mask($nick(" & Words(0) & "," & words(2) & ").mask,2)",ServerNumber) Bmsg1 = "1" Elseif not Len(Words(2)) > 9 then Sendcommand "/notice " & Nickname & " Error: Please be more specific",ServerNumber Exit Sub End If Brson = "" If Mid(Message,Len(Words(0)) -- Len(Words(1)) -- Len(Words(2)) -- 4)= "" then Brson = Nickname Else Brson = Mid(Message,Len(Words(0)) -- Len(Words(1)) -- Len(Words(2)) -- 4) End If Do while not Bcheck < "1" Bcheck = Bcheck - 1 If not Bcheck < "1" then If Lcase(GetIniFile("" & words(0) & ".txt","Blist",Bcheck,"")) = Lcase(Bmsg) then Sendcommand "/notice " & Nickname & " Error: Host already banned on line: " & Bcheck & "",ServerNumber Exit Sub ElseIf InStr(Lcase(Bmsg),Lcase(GetIniFile("" & words(0) & ".txt","Blist",Bcheck,""))) and not GetIniFile("" & words(0) & ".txt","Blist",Bcheck,"") = "" then Sendcommand "/notice " & Nickname & " Error: Host already banned on line: " & Bcheck & "",ServerNumber Exit Sub ElseIf GetIniFile("" & words(0) & ".txt","Blist",Bcheck,"") = "" then Baval = Bcheck ElseIf InStr(Lcase(GetIniFile("" & words(0) & ".txt","Blist",Bcheck,"")),Lcase(Bmsg)) then Writeinifile"" & words(0) & ".txt","Blist",Bcheck,"" Writeinifile"" & words(0) & ".txt","Blist","" & Bcheck & "i","" Baval = Bcheck End If ElseIf not Baval = "" then writeIniFile"" & words(0) & ".txt","Blist",Baval,Bmsg writeIniFile"" & words(0) & ".txt","Blist","" & Baval & "i","" & Nickname & " " & Getidentifier("$date",ServerNumber) & " " & Brson & "" If Mid(Message,Len(Words(0)) + Len(Words(1)) + Len(Words(2)) -- 4)="" then Brson = Nickname Else Brson = Mid(Message,Len(Words(0)) + Len(Words(1)) + Len(Words(2)) -- 4) End if Sendcommand "/notice " & Nickname & " Added to ban list: " & Bmsg & " - Ban number: " & Baval & "",ServerNumber If Bmsg1 = "1" then Sendcommand "/mode " & Words(0) & " +b " & Bmsg & "",ServerNumber Else Sendcommand "/mode " & Words(0) & " +b *" & Bmsg & "*",ServerNumber End if Sendcommand "/! Addaban " & words(0) & "|" & Bmsg & "|" & Brson & "|" & ServerNumber & "",ServerNumber WriteIniFile"" & words(0) & ".txt","Lastban","Ban",Bmsg WriteIniFile"" & words(0) & ".txt","Lastban","Bani",Baval Else Sendcommand "/notice " & 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("" & words(0) & ".txt",Getidentifier("$mask(" & Nickname & "!" & Host & ",2)"),"Protect","")="Yes" then SendCommand "/notice " & Nickname & " Error: No permission",ServerNumber Else Bcheck="51" If Mid(Message,Len(Words(0)) -- Len(Words(1)) -- 3)="" then Sendcommand "/notice " & Nickname & " Error: Please state a host or number!",SerevrNumber ElseIf not Len(Words(2)) > 9 then If GetIniFile("" & words(0) & ".txt","Blist",Words(2),"") = "" then Sendcommand "/notice " & Nickname & " Error: Invalid number/Host input is too short!",ServerNumber Else Sendcommand "/mode " & Words(0) & " -b *" & GetIniFile("" & words(0) & ".txt","Blist",Words(2),"") & "*",ServerNumber Writeinifile"" & words(0) & ".txt","Blist",Words(2),"" Writeinifile"" & words(0) & ".txt","Blist","" & Words(2) & "i","" Sendcommand "/notice " & Nickname & " Ban number " & Words(2) & " Removed",ServerNumber End if Else Bcheck = "51" Bmsg = words(2) Bgen="" Bcount= "0" Bfound = "" Do while not Bcheck < "1" Bcheck = Bcheck - 1 If not Bcheck < "1" then If Bcount = "6" then Sendcommand "/mode " & Words(0) & " -bbbbbb " & Bgen & "",ServerNumber Bgen = "" Bcount = "0" End If If Lcase(GetIniFile("" & words(0) & ".txt","Blist",Bcheck,"")) = Lcase(Bmsg) then Bgen= Bgen + "*" & GetIniFile("" & words(0) & ".txt","Blist",Bcheck,"") & "* " Bcount = Bcount -- 1 Writeinifile"" & words(0) & ".txt","Blist",Bcheck,"" Writeinifile"" & words(0) & ".txt","Blist","" & Bcheck & "i","" Bfound = "1" ElseIf InStr(Lcase(Bmsg),Lcase(GetIniFile("" & words(0) & ".txt","Blist",Bcheck,""))) and not GetIniFile("" & words(0) & ".txt","Blist",Bcheck,"") = "" then Sendcommand "/notice " & nickname & " Shorter ban found on ban line: " & Bcheck & "",ServerNumber ElseIf InStr(Lcase(GetIniFile("" & words(0) & ".txt","Blist",Bcheck,"")),Lcase(Bmsg)) then Bgen= Bgen + "*" & GetIniFile("" & words(0) & ".txt","Blist",Bcheck,"") & "* " Bcount = Bcount -- 1 Writeinifile"" & words(0) & ".txt","Blist",Bcheck,"" Writeinifile"" & words(0) & ".txt","Blist","" & Bcheck & "i","" Bfound = "1" End If Else If Bfound="1" then If not Bgen = "" then Sendcommand "/mode " & Words(0) & " -bbbbbb " & Bgen & "",ServerNumber End If Sendcommand "/notice " & Nickname & " Removed ban(s)",ServerNumber Else Sendcommand "/notice " & Nickname & " No bans were removed matching your criteria",ServerNumber End If End If Loop End If End If Case "banlist" If not GetIniFile("" & words(0) & ".txt",Getidentifier("$mask(" & Nickname & "!" & Host & ",2)"),"Host","") = "" and GetIniFile("" & words(0) & ".txt","DCC","Allowed","")>"2" then If not Mid(Message,Len(Words(0)) -- Len(Words(1)) -- 3)="" then If GetIniFile("" & words(0) & ".txt","Blist",Words(2),"") = "" and not Len(Words(2)) > 9 then Sendcommand "/notice " & Nickname & " Error: Invalid number/Host input is too short!",ServerNumber Elseif Len(Words(2)) > 9 then Sendcommand "/! Banlist " & Nickname & "|" & words(0) & "|" & ServerNumber & "|" & Words(2) & "" Else Sendcommand "/notice " & Nickname & " Ban: " & GetIniFile("" & words(0) & ".txt","Blist",Words(2),"") & " - Info/Date/Reason: " & GetIniFile("" & words(0) & ".txt","Blist","" & Words(2) & "i","") & "",ServerNumber End if ElseIf GetIniFile("Settings.txt","Settings","Users","")="0" then SendCommand "/notice " & Nickname & " Banlist generator has been disabled by the bot owner! Please see the help info for Banlist",ServerNumber Else Sendcommand "/! Banlist " & Nickname & "|" & words(0) & "|" & ServerNumber & "|1" End If ElseIf GetIniFile("" & words(0) & ".txt",Getidentifier("$mask(" & Nickname & "!" & Host & ",2)"),"Mod","") = "Yes" and GetIniFile("" & words(0) & ".txt","DCC","Allowed","")>"1" then If not Mid(Message,Len(Words(0)) -- Len(Words(1)) -- 3)="" then If GetIniFile("" & words(0) & ".txt","Blist",Words(2),"") = "" and not Len(Words(2)) > 9 then Sendcommand "/notice " & Nickname & " Error: Invalid number/Host input is too short!",ServerNumber Elseif Len(Words(2)) > 9 then Sendcommand "/! Banlist " & Nickname & "|" & words(0) & "|" & ServerNumber & "|" & Words(2) & "" Else Sendcommand "/notice " & Nickname & " Ban: " & GetIniFile("" & words(0) & ".txt","Blist",Words(2),"") & " - Info/Date/Reason: " & GetIniFile("" & words(0) & ".txt","Blist","" & Words(2) & "i","") & "",ServerNumber End if ElseIf GetIniFile("Settings.txt","Settings","Users","")="0" then SendCommand "/notice " & Nickname & " Banlist generator has been disabled by the bot owner! Please see the help info for Banlist",ServerNumber Else Sendcommand "/! Banlist " & Nickname & "|" & words(0) & "|" & ServerNumber & "|1" End If ElseIf GetIniFile("" & words(0) & ".txt",Getidentifier("$mask(" & Nickname & "!" & Host & ",2)"),"Admin","") = "Yes" and GetIniFile("" & words(0) & ".txt","DCC","Allowed","")>"0" then If not Mid(Message,Len(Words(0)) -- Len(Words(1)) -- 3)="" then If GetIniFile("" & words(0) & ".txt","Blist",Words(2),"") = "" and not Len(Words(2)) > 9 then Sendcommand "/notice " & Nickname & " Error: Invalid number/Host input is too short!",ServerNumber Elseif Len(Words(2)) > 9 then Sendcommand "/! Banlist " & Nickname & "|" & words(0) & "|" & ServerNumber & "|" & Words(2) & "" Else Sendcommand "/notice " & Nickname & " Ban: " & GetIniFile("" & words(0) & ".txt","Blist",Words(2),"") & " - Info/Date/Reason: " & GetIniFile("" & words(0) & ".txt","Blist","" & Words(2) & "i","") & "",ServerNumber End if ElseIf GetIniFile("Settings.txt","Settings","Users","")="0" then SendCommand "/notice " & Nickname & " Banlist generator has been disabled by the bot owner! Please see the help info for Banlist",ServerNumber Else Sendcommand "/! Banlist " & Nickname & "|" & words(0) & "|" & ServerNumber & "|1" End If Elseif GetIniFile("" & words(0) & ".txt",Getidentifier("$mask(" & Nickname & "!" & Host & ",2)"),"Protect","") = "Yes" then If not Mid(Message,Len(Words(0)) -- Len(Words(1)) -- 3)="" then If GetIniFile("" & words(0) & ".txt","Blist",Words(2),"") = "" and not Len(Words(2)) > 9 then Sendcommand "/notice " & Nickname & " Error: Invalid number/Host input is too short!",ServerNumber Elseif Len(Words(2)) > 9 then Sendcommand "/! Banlist " & Nickname & "|" & words(0) & "|" & ServerNumber & "|" & Words(2) & "" Else Sendcommand "/notice " & Nickname & " Ban: " & GetIniFile("" & words(0) & ".txt","Blist",Words(2),"") & " - Info/Date/Reason: " & GetIniFile("" & words(0) & ".txt","Blist","" & Words(2) & "i","") & "",ServerNumber End if ElseIf GetIniFile("Settings.txt","Settings","Users","")="0" then SendCommand "/notice " & Nickname & " Banlist generator has been disabled by the bot owner! Please see the help info for Banlist",ServerNumber Else Sendcommand "/! Banlist " & Nickname & "|" & words(0) & "|" & ServerNumber & "|1" End If Else SendCommand "/notice " & Nickname & " Error: No permission! - " & GetIniFile("" & words(0) & ".txt","DCC","Allowed","") & "",ServerNumber End If Case "unsuspend" If GetIniFile("" & Words(0) & ".txt",Getidentifier("$mask(" & Nickname & "!" & Host & ",2)"),"Admin","") ="Yes" then If Mid(Message,Len(words(0)) -- Len(Words(1)) -- 3) = "" then Sendcommand "/notice " & Nickname & " Error: Please state a user to unsuspend",ServerNumber ElseIf GetIniFile("" & Words(0) & ".txt",GetIdentifier("$mask($nick(" & Words(0) & "," & words(2) & ").mask,2)",ServerNumber),"Nick","")="" and GetIniFile("" & Words(0) & ".txt",words(2),"Host","")="" then SendCommand "/notice " & Nickname & " User " & words(2) & " does not exist",ServerNumber ElseIf GetIniFile("" & Channel & ".txt",Getidentifier("$mask(" & Nickname & "!" & Host & ",2)"),"Special","")="S" then SendCommand "/notice " & Nickname & " Sorry, you are restricted from using this command!",ServerNumber Elseif GetIniFile("" & Words(0) & ".txt",GetIdentifier("$mask($nick(" & Words(0) & "," & words(2) & ").mask,2)",ServerNumber),"Admin","") ="Yes" and not GetIniFile("" & Words(0) & ".txt",Getidentifier("$mask(" & Nickname & "!" & Host & ",2)"),"Protect","")="Yes" then SendCommand "/notice " & Nickname & " Error: You cannot unsuspend other admins!",ServerNumber ElseIf GetIniFile("" & Words(0) & ".txt",GetIniFile("" & Words(0) & ".txt",words(2),"Host",""),"Admin","")="Yes" and not GetIniFile("" & Words(0) & ".txt",Getidentifier("$mask(" & Nickname & "!" & Host & ",2)"),"Protect","")="Yes" then SendCommand "/notice " & Nickname & " Error: You cannot unsuspend other admins!",ServerNumber ElseIf not Left(GetIniFile("" & Words(0) & ".txt",GetIdentifier("$mask($nick(" & Words(0) & "," & words(2) & ").mask,2)",ServerNumber),"Host",""),1)="s" and not Left(GetIniFile("" & Words(0) & ".txt",GetIniFile("" & Words(0) & ".txt",words(2),"Host",""),"Host",""),1)="s" then SendCommand "/notice " & Nickname & " Error: This user is not suspended!",ServerNumber ElseIf GetIniFile("" & Words(0) & ".txt",GetIdentifier("$mask($nick(" & Words(0) & "," & words(2) & ").mask,2)",ServerNumber),"Protect","")="Yes" or GetIniFile("" & Words(0) & ".txt",GetIniFile("" & Words(0) & ".txt",words(2),"Host",""),"Protect","")="Yes" then SendCommand "/notice " & Nickname & " " & words(2) & " is protected!",ServerNumber ElseIf not GetIniFile("" & Words(0) & ".txt",GetIniFile("" & Words(0) & ".txt",words(2),"Host",""),"Host","")="" then Banner = Mid(GetIniFile("" & Words(0) & ".txt",GetIniFile("" & Words(0) & ".txt",words(2),"Host",""),"Mod",""),3) Writeinifile"" & Words(0) & ".txt",GetIniFile("" & Words(0) & ".txt",words(2),"Host",""),"Mod",Banner Banner = Mid(GetIniFile("" & Words(0) & ".txt",GetIniFile("" & Words(0) & ".txt",words(2),"Host",""),"Admin",""),3) Writeinifile"" & Words(0) & ".txt",GetIniFile("" & Words(0) & ".txt",words(2),"Host",""),"Admin",Banner Banner = Mid(GetIniFile("" & Words(0) & ".txt",GetIniFile("" & Words(0) & ".txt",words(2),"Host",""),"Host",""),3) WriteIniFile"" & Words(0) & ".txt",GetIniFile("" & Words(0) & ".txt",words(2),"Host",""),"Host",Banner SendCommand "/notice " & Nickname & " User unsuspended!",ServerNumber sendcommand "/mode " & Words(0) & " +v " & words(2) & "",ServerNumber Else Banner = Mid(Getinifile("" & Words(0) & ".txt",GetIdentifier("$mask($nick(" & Words(0) & "," & words(2) & ").mask,2)",ServerNumber),"Mod",""),3) WriteIniFile"" & Words(0) & ".txt",GetIdentifier("$mask($nick(" & Words(0) & "," & words(2) & ").mask,2)",ServerNumber),"Mod",Banner Banner = Mid(Getinifile("" & Words(0) & ".txt",GetIdentifier("$mask($nick(" & Words(0) & "," & words(2) & ").mask,2)",ServerNumber),"Admin",""),3) WriteIniFile"" & Words(0) & ".txt",GetIdentifier("$mask($nick(" & Words(0) & "," & words(2) & ").mask,2)",ServerNumber),"Admin",Banner Banner = GetIdentifier("$mask($nick(" & Words(0) & "," & words(2) & ").mask,2)",ServerNumber) WriteIniFile"" & Words(0) & ".txt",GetIdentifier("$mask($nick(" & Words(0) & "," & words(2) & ").mask,2)",ServerNumber),"Host",Banner SendCommand "/notice " & Nickname & " User unsuspended!",ServerNumber sendcommand "/mode " & Words(0) & " +v " & words(2) & "",ServerNumber End If Else SendCommand "/notice " & Nickname & " Error: Not a channel admin!",ServerNumber End If Case "restrict" If GetIniFile("" & Words(0) & ".txt",Getidentifier("$mask(" & Nickname & "!" & Host & ",2)"),"Protect","") ="Yes" then If GetIniFile("" & Words(0) & ".txt",GetIdentifier("$mask($nick(" & Words(0) & "," & Words(2) & ").mask,2)",ServerNumber),"Host","")="" and GetIniFile("" & Words(0) & ".txt",Words(2),"Host","")="" then SendCommand "/Notice " & Nickname & " That user does not exist!",ServerNumber ElseIf GetIniFile("" & Words(0) & ".txt",GetIniFile("" & Words(0) & ".txt",GetIdentifier("$mask($nick(" & Words(0) & "," & Words(2) & ").mask,2)",ServerNumber),"Host",""),"Protect","")="Yes" or GetIniFile("" & Words(0) & ".txt",GetIniFile("" & Words(0) & ".txt",Words(2),"Host",""),"Protect","")="Yes" then SendCommand "/notice " & Nickname & " That user is protected!",ServerNumber ElseIf GetIniFile("" & Words(0) & ".txt",GetIniFile("" & Words(0) & ".txt",GetIdentifier("$mask($nick(" & Words(0) & "," & Words(2) & ").mask,2)",ServerNumber),"Host",""),"Admin","")="No" or GetIniFile("" & Words(0) & ".txt",GetIniFile("" & Words(0) & ".txt",Words(2),"Host",""),"Admin","")="No" then SendCommand "/notice " & Nickname & " Error: This command only works on admins!",ServerNumber ElseIf GetIniFile("" & Words(0) & ".txt",GetIniFile("" & Words(0) & ".txt",GetIdentifier("$mask($nick(" & Words(0) & "," & Words(2) & ").mask,2)",ServerNumber),"Host",""),"Special","")="S" or GetIniFile("" & Words(0) & ".txt",GetIniFile("" & Words(0) & ".txt",Words(2),"Host",""),"Special","")="S" then SendCommand "/notice " & Nickname & " That user is already restricted!",ServerNumber ElseIf not GetIniFile("" & Words(0) & ".txt",GetIniFile("" & Words(0) & ".txt",Words(2),"Host",""),"Host","")="" then WriteIniFile"" & Words(0) & ".txt",GetIniFile("" & Words(0) & ".txt",Words(2),"Host",""),"Special","S" SendCommand "/notice " & Nickname & " User is now on admin restrictions!",ServerNumber Else WriteIniFile"" & Words(0) & ".txt",GetIdentifier("$mask($nick(" & Words(0) & "," & Words(2) & ").mask,2)",ServerNumber),"Special","S" SendCommand "/notice " & Nickname & " User is now on admin restrictions!",ServerNumber End If Else SendCommand "/notice " & Nickname & " Error: Not a channel owner!",ServerNumber End If Case "unrestrict" If GetIniFile("" & Words(0) & ".txt",Getidentifier("$mask(" & Nickname & "!" & Host & ",2)"),"Protect","") ="Yes" then If GetIniFile("" & Words(0) & ".txt",GetIdentifier("$mask($nick(" & Words(0) & "," & Words(2) & ").mask,2)",ServerNumber),"Host","")="" and GetIniFile("" & Words(0) & ".txt",Words(2),"Host","")="" then SendCommand "/Notice " & Nickname & " That user does not exist!",ServerNumber ElseIf GetIniFile("" & Words(0) & ".txt",GetIniFile("" & Words(0) & ".txt",GetIdentifier("$mask($nick(" & Words(0) & "," & Words(2) & ").mask,2)",ServerNumber),"Host",""),"Protect","")="Yes" or GetIniFile("" & Words(0) & ".txt",GetIniFile("" & Words(0) & ".txt",Words(2),"Host",""),"Protect","")="Yes" then SendCommand "/notice " & Nickname & " That user is protected!",ServerNumber ElseIf GetIniFile("" & Words(0) & ".txt",GetIniFile("" & Words(0) & ".txt",GetIdentifier("$mask($nick(" & Words(0) & "," & Words(2) & ").mask,2)",ServerNumber),"Host",""),"Special","")="" and GetIniFile("" & Words(0) & ".txt",GetIniFile("" & Words(0) & ".txt",Words(2),"Host",""),"Special","")="" then SendCommand "/notice " & Nickname & " That user is not restricted!",ServerNumber ElseIf not GetIniFile("" & Words(0) & ".txt",GetIniFile("" & Words(0) & ".txt",Words(2),"Host",""),"Host","")="" then WriteIniFile"" & Words(0) & ".txt",GetIniFile("" & Words(0) & ".txt",Words(2),"Host",""),"Special","" SendCommand "/notice " & Nickname & " User is no longer on admin restrictions!",ServerNumber Else WriteIniFile"" & Words(0) & ".txt",GetIdentifier("$mask($nick(" & Words(0) & "," & Words(2) & ").mask,2)",ServerNumber),"Special","" SendCommand "/notice " & Nickname & " User is no longer on admin restrictions!",ServerNumber End If Else SendCommand "/notice " & Nickname & " Error: Not a channel owner!",ServerNumber End If Case "greet" If GetIniFile("" & words(0) & ".txt",Getidentifier("$mask(" & Nickname & "!" & Host & ",2)"),"Mod","") ="Yes" then If GetIniFile("" & words(0) & ".txt","Topic","Lock","")="On" and not GetIniFile("" & words(0) & ".txt",Getidentifier("$mask(" & Nickname & "!" & Host & ",2)"),"Admin","") ="Yes" then SendCommand "/notice " & Nickname & " Cannot change greet! Reason: Locked by an admin",ServerNumber ElseIf Mid(Message,Len(Words(0)) + Len(Words(1)) -- 3)="" and Getinifile("" & words(0) & ".txt","Joinmsg","Msg","")="" then SendCommand "/notice " & Nickname & " Error: Nothing to clear",ServerNumber Elseif Lcase(Mid(Message,Len(Words(0)) + Len(Words(1)) -- 3))="0" and Getinifile("" & words(0) & ".txt","Joinmsg","Msg","")="&" then SendCommand "/notice " & nickname & " Error: Greet is already off!",ServerNumber Elseif Mid(Message,Len(Words(0)) + Len(Words(1)) -- 3)="" then Writeinifile"" & words(0) & ".txt","Joinmsg","Msg","Welcome back!" SendCommand "/notice " & Nickname & " Default Greet message used", ServerNumber ElseIf Lcase(Mid(Message,Len(Words(0)) + Len(Words(1)) -- 3))="0" then Writeinifile"" & words(0) & ".txt","Joinmsg","Msg","&" SendCommand "/notice " & Nickname & " Greet message off", ServerNumber Else Writeinifile"" & words(0) & ".txt","Joinmsg","Msg",Mid(Message,Len(Words(0)) + Len(Words(1)) -- 3) SendCommand "/notice " & Nickname & " " & Mid(Message,Len(Words(0)) + Len(Words(1)) -- 3) & "", ServerNumber End if Else SendCommand "/notice " & Nickname & " Error: Not a channel moderator!",ServerNumber End If Case "infolock" If GetIniFile("" & Words(0) & ".txt",Getidentifier("$mask(" & Nickname & "!" & Host & ",2)"),"Admin","") ="Yes" then If GetIniFile("" & Words(0) & ".txt","Topic","Lock","")="On" then WriteIniFile"" & Words(0) & ".txt","Topic","Lock","Off" SendCommand "/notice " & Nickname & " Info is now free to edit!",ServerNumber ElseIf GetIniFile("" & Words(0) & ".txt","Topic","Lock","")="Off" then WriteIniFile"" & Words(0) & ".txt","Topic","Lock","On" SendCommand "/notice " & Nickname & " Info is now locked to editors!",ServerNumber End If Else SendCommand "/notice " & Nickname & " Error: Not a channel admin",ServerNumber End If Case "dtopic" If GetIniFile("" & words(0) & ".txt",Getidentifier("$mask(" & Nickname & "!" & Host & ",2)"),"Protect","") ="Yes" then If Mid(Message,Len(Words(0)) + Len(Words(1)) -- 3)="" then If Getinifile("" & words(0) & ".txt","Topic","Ident","")="" then SendCommand "/notice " & nickname & " Error: Nothing to clear!",ServerNumber Else SendCommand "/topic " & words(0) & " Welcome to " & words(0) & " || " & Getinifile("" & words(0) & ".txt","Topic","Topic","") & "",ServerNumber Writeinifile"" & words(0) & ".txt","Topic","Ident","Welcome to " & words(0) & " ||" SendCommand "/notice " & Nickname & " Default topic ident used!",ServerNumber End If ElseIf not Mid(Message,Len(Words(0)) + Len(Words(1)) -- 3)="" then If Getinifile("" & words(0) & ".txt","Topic","Ident","")= Mid(Message,Len(Words(0)) + Len(Words(1)) -- 3) then SendCommand "/notice " & nickname & " Error: You are using the same default! Try &Trefresh to resolve any errors.",ServerNumber Else SendCommand "/topic " & words(0) & " " & Mid(Message,Len(Words(0)) + Len(Words(1)) -- 3) & " " & Getinifile("" & words(0) & ".txt","Topic","Topic","") & "",ServerNumber Writeinifile"" & words(0) & ".txt","Topic","Ident",Mid(Message,Len(Words(0)) + Len(Words(1)) -- 3) End If End if Else SendCommand "/notice " & Nickname & " Error: Not a channel owner!",ServerNumber End If Case "tool" If not GetIniFile("" & words(0) & ".txt",Getidentifier("$mask(" & Nickname & "!" & Host & ",2)"),"Protect","") ="Yes" or not words(0)=Getinifile("Settings.txt","Settings","Channel","") then Sendcommand "/notice " & Nickname & " Error: No permission!",ServerNumber ElseIf Mid(Message,Len(words(0)) -- Len(Words(1)) -- 3) = "" then Sendcommand "/notice " & Nickname & " Error: Please state a character to use for your new tool",ServerNumber Elseif Getinifile("Settings.txt","Settings","Tool","") = words(2) then Sendcommand "/notice " & Nickname & " Error: You already have this as your current tool!",ServerNumber ElseIf not Mid(words(2),2)="" then Sendcommand "/notice " & Nickname & " Error: Please only use a single character tool!",ServerNumber Else writeinifile"Settings.txt","Settings","Tool",Lcase(Left(words(2),1)) Sendcommand "/notice " & Nickname & " Success: Your new tool is " & Getinifile("Settings.txt","Settings","Tool","") & "",ServerNumber End If Case "clearinfo" If GetIniFile("" & Words(0) & ".txt",Getidentifier("$mask(" & Nickname & "!" & Host & ",2)"),"Admin","") ="Yes" then If Mid(Message,Len(words(0)) -- Len(Words(1)) -- 3) = "" then Sendcommand "/notice " & Nickname & " Error: Please state a user to clear info",ServerNumber ElseIf GetIniFile("" & Words(0) & ".txt",GetIdentifier("$mask($nick(" & Words(0) & "," & words(2) & ").mask,2)",ServerNumber),"Host","")="" and GetIniFile("" & Words(0) & ".txt",words(2),"Host","")="" then SendCommand "/Notice " & Nickname & " That user does not exist!",ServerNumber ElseIf GetIniFile("" & Words(0) & ".txt",GetIniFile("" & Words(0) & ".txt",GetIdentifier("$mask($nick(" & Words(0) & "," & words(2) & ").mask,2)",ServerNumber),"Host",""),"Protect","")="Yes" or GetIniFile("" & Words(0) & ".txt",GetIniFile("" & Words(0) & ".txt",words(2),"Host",""),"Protect","")="Yes" then SendCommand "/notice " & Nickname & " That user is protected!",ServerNumber ElseIf GetIniFile("" & Words(0) & ".txt",GetIniFile("" & Words(0) & ".txt",GetIdentifier("$mask($nick(" & Words(0) & "," & words(2) & ").mask,2)",ServerNumber),"Host",""),"Join","")="" and GetIniFile("" & Words(0) & ".txt",GetIniFile("" & Words(0) & ".txt",words(2),"Host",""),"Join","")="" then SendCommand "/notice " & Nickname & " That user has no info to clear!",ServerNumber ElseIf Left(GetIniFile("" & Words(0) & ".txt",GetIniFile("" & Words(0) & ".txt",GetIdentifier("$mask($nick(" & Words(0) & "," & words(2) & ").mask,2)",ServerNumber),"Host",""),"Join",""),1)="&" or Left(GetIniFile("" & Words(0) & ".txt",GetIniFile("" & Words(0) & ".txt",words(2),"Host",""),"Join",""),1)="&" then SendCommand "/notice " & Nickname & " Error: An admin has already cleared this user's info!",ServerNumber ElseIf not GetIniFile("" & Words(0) & ".txt",GetIniFile("" & Words(0) & ".txt",words(2),"Host",""),"Join","")="" then WriteIniFile"" & Words(0) & ".txt",GetIniFile("" & Words(0) & ".txt",words(2),"Host",""),"Join","& " & GetIniFile("" & Words(0) & ".txt",Getidentifier("$mask(" & Nickname & "!" & Host & ",2)"),"Nick","") & "" SendCommand "/notice " & Nickname & " Info cleared!",ServerNumber Else WriteIniFile"" & Words(0) & ".txt",GetIdentifier("$mask($nick(" & Words(0) & "," & words(2) & ").mask,2)",ServerNumber),"Join","& " & GetIniFile("" & Words(0) & ".txt",Getidentifier("$mask(" & Nickname & "!" & Host & ",2)"),"Nick","") & "" SendCommand "/notice " & Nickname & " Info cleared!",ServerNumber End If Else SendCommand "/notice " & Nickname & " Error: Not a channel admin!",ServerNumber End If Case "op" If Mid(Message,Len(Words(0)) -- Len(Words(1)) -- 3) = "" then exit sub oword = Split(Mid(Message,Len(words(0)) + Len(Words(1)) -- 3) + " s"," ") ovoc = "0" Thumb = "" othumb = "" If Lcase(words(2))="0" and GetIniFile("" & words(0) & ".txt",Getidentifier("$mask(" & Nickname & "!" & Host & ",2)"),"Mod","") ="Yes" then If getinifile("" & words(0) & ".txt",Getidentifier("$mask(" & Nickname & "!" & Host & ",2)"),"Op","")="Off" then SendCommand "/notice " & Nickname & " Error: You already disabled automatic op for yourself!",ServerNumber Else writeinifile"" & words(0) & ".txt",Getidentifier("$mask(" & Nickname & "!" & Host & ",2)"),"Op","Off" SendCommand "/notice " & Nickname & " Auto op now off",ServerNumber End If ElseIf Lcase(words(2))="1" and GetIniFile("" & words(0) & ".txt",Getidentifier("$mask(" & Nickname & "!" & Host & ",2)"),"Mod","") ="Yes" then If getinifile("" & words(0) & ".txt",Getidentifier("$mask(" & Nickname & "!" & Host & ",2)"),"Op","")="" then SendCommand "/notice " & Nickname & " Error: You already enabled automatic op for yourself!",ServerNumber Else writeinifile"" & words(0) & ".txt",Getidentifier("$mask(" & Nickname & "!" & Host & ",2)"),"Op","" SendCommand "/notice " & Nickname & " Auto op now on (If applicable)",ServerNumber End If ElseIf GetIniFile("" & words(0) & ".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 " & words(0) & " +oooooo " & othumb & "",ServerNumber End If If Not Thumb = "" then SendCommand "/notice " & Nickname & " Already opped users: " & Thumb & "",ServerNumber End If ovoc = "7" ElseIf IsOp(oword(ovoc),words(0),ServerNumber) and not GetIdentifier("$mask($nick(" & words(0) & "," & oword(ovoc) & ").mask,2)",ServerNumber)="$null" then Thumb = Thumb + " " & oword(ovoc) & "" Elseif not GetIdentifier("$mask($nick(" & words(0) & "," & oword(ovoc) & ").mask,2)",ServerNumber)="$null" then othumb = othumb + " " & oword(ovoc) & "" End If ovoc = ovoc -- 1 Loop ElseIf GetIniFile("" & words(0) & ".txt",Getidentifier("$mask(" & Nickname & "!" & Host & ",2)"),"Admin","") ="Yes" and not GetIniFile("" & words(0) & ".txt","op","Set","")="0" then Do while not ovoc > "7" If oword(ovoc) = "s" or ovoc = "7" then If not othumb = "" then SendCommand "/mode " & words(0) & " +oooooo " & othumb & "",ServerNumber End If If Not Thumb = "" then SendCommand "/notice " & Nickname & " Already opped users: " & Thumb & "",ServerNumber End If ovoc = "7" ElseIf IsOp(oword(ovoc),words(0),ServerNumber) and not GetIdentifier("$mask($nick(" & words(0) & "," & oword(ovoc) & ").mask,2)",ServerNumber)="$null" then Thumb = Thumb + " " & oword(ovoc) & "" Elseif not GetIdentifier("$mask($nick(" & words(0) & "," & oword(ovoc) & ").mask,2)",ServerNumber)="$null" then othumb = othumb + " " & oword(ovoc) & "" End If ovoc = ovoc -- 1 Loop Else SendCommand "/notice " & Nickname & " Error: No permission!",Servernumber End If Case "deop" If Mid(Message,Len(Words(0)) -- Len(Words(1)) -- 3) = "" then exit sub Oword = Split(Mid(Message,Len(words(0)) + Len(Words(1)) -- 3) + " s"," ") Ovoc = "0" Thumb = "" Othumb = "" OPthumb = "" If GetIniFile("" & words(0) & ".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 " & Words(0) & " -oooooo " & Othumb & "",ServerNumber End If If Not Thumb = "" and not OPthumb="" then SendCommand "/notice " & Nickname & " Already deopped users: " & Thumb & " - You cannot deop these users: " & OPthumb & "",ServerNumber Else If not OPthumb = "" then SendCommand "/notice " & Nickname & " You cannot deop these users: " & OPthumb & "",ServerNumber End If If Not Thumb = "" then SendCommand "/notice " & Nickname & " Already deopped users: " & Thumb & "",ServerNumber End If End If Ovoc = "7" ElseIf not IsOp(Oword(Ovoc),words(0),ServerNumber) and not GetIdentifier("$mask($nick(" & words(0) & "," & Oword(Ovoc) & ").mask,2)",ServerNumber)="$null" then Thumb = Thumb + " " & Oword(Ovoc) & "" Elseif GetIniFile("" & Words(0) & ".txt",GetIdentifier("$mask($nick(" & Words(0) & "," & Oword(Ovoc) & ").mask,2)",ServerNumber),"Protect","")="Yes" and not GetIniFile("" & Words(0) & ".txt",GetIdentifier("$mask($nick(" & Words(0) & "," & Oword(Ovoc) & ").mask,2)",ServerNumber),"Host","")=Getidentifier("$mask(" & Nickname & "!" & Host & ",2)") then OPthumb = OPthumb + " " & Oword(Ovoc) & "" Elseif not GetIdentifier("$mask($nick(" & words(0) & "," & Oword(Ovoc) & ").mask,2)",ServerNumber)="$null" then Othumb = Othumb + " " & Oword(Ovoc) & "" End If Ovoc = Ovoc -- 1 Loop ElseIf GetIniFile("" & words(0) & ".txt",Getidentifier("$mask(" & Nickname & "!" & Host & ",2)"),"Admin","") ="Yes" and not GetIniFile("" & words(0) & ".txt","op","Set","")="0" then Do while not Ovoc > "7" If Oword(Ovoc) = "s" or Ovoc = "7" then If not Othumb = "" then SendCommand "/mode " & Words(0) & " -oooooo " & Othumb & "",ServerNumber End If If Not Thumb = "" and not OPthumb="" then SendCommand "/notice " & Nickname & " Already deopped users: " & Thumb & " - You cannot deop these users: " & OPthumb & "",ServerNumber Else If not OPthumb = "" then SendCommand "/notice " & Nickname & " You cannot deop these users: " & OPthumb & "",ServerNumber End If If Not Thumb = "" then SendCommand "/notice " & Nickname & " Already deopped users: " & Thumb & "",ServerNumber End If End If Ovoc = "7" ElseIf not IsOp(Oword(Ovoc),words(0),ServerNumber) and not GetIdentifier("$mask($nick(" & words(0) & "," & Oword(Ovoc) & ").mask,2)",ServerNumber)="$null" then Thumb = Thumb + " " & Oword(Ovoc) & "" Elseif GetIniFile("" & Words(0) & ".txt",GetIdentifier("$mask($nick(" & Words(0) & "," & Oword(Ovoc) & ").mask,2)",ServerNumber),"Admin","")="Yes" and not GetIniFile("" & Words(0) & ".txt",GetIdentifier("$mask($nick(" & Words(0) & "," & Oword(Ovoc) & ").mask,2)",ServerNumber),"Host","")=Getidentifier("$mask(" & Nickname & "!" & Host & ",2)") then OPthumb = OPthumb + " " & Oword(Ovoc) & "" Elseif not GetIdentifier("$mask($nick(" & words(0) & "," & Oword(Ovoc) & ").mask,2)",ServerNumber)="$null" then Othumb = Othumb + " " & Oword(Ovoc) & "" End If Ovoc = Ovoc -- 1 Loop Else SendCommand "/notice " & Nickname & " Error: No permission!",Servernumber End If Case "voice", "v" If GetIniFile("" & Words(0) & ".txt",Getidentifier("$mask(" & Nickname & "!" & Host & ",2)"),"Mod","") ="Yes" or IsOp(Nickname,words(0),ServerNumber) then Vword = Split(Mid(Message,Len(words(0)) + Len(Words(1)) -- 3) + " s"," ") Lvoc = "0" Thumb = "" Vthumb = "" Do while not Lvoc > "7" If Vword(Lvoc) = "s" or Lvoc = "7" then If not Vthumb = "" then SendCommand "/mode " & Words(0) & " +vvvvvv " & Vthumb & "",ServerNumber End If If Not Thumb = "" then SendCommand "/notice " & Nickname & " Already voiced users: " & Thumb & "",ServerNumber End If Lvoc = "7" ElseIf IsVoice(Vword(Lvoc),words(0),ServerNumber) and not GetIdentifier("$mask($nick(" & words(0) & "," & Vword(Lvoc) & ").mask,2)",ServerNumber)="$null" then Thumb = Thumb + " " & Vword(Lvoc) & "" Elseif not GetIdentifier("$mask($nick(" & words(0) & "," & Vword(Lvoc) & ").mask,2)",ServerNumber)="$null" then Vthumb = Vthumb + " " & Vword(Lvoc) & "" End If Lvoc = Lvoc -- 1 Loop Else SendCommand "/notice " & Nickname & " Error: Not a channel moderator!",ServerNumber End If Case "devoice", "dv" If GetIniFile("" & Words(0) & ".txt",Getidentifier("$mask(" & Nickname & "!" & Host & ",2)"),"Mod","") ="Yes" or IsOp(Nickname,words(0),ServerNumber) then Vword = Split(Mid(Message,Len(words(0)) + Len(Words(1)) -- 3) + " 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 " & Words(0) & " -vvvvvv " & Vthumb & "",ServerNumber End If If Not Thumb = "" and not VPthumb="" then SendCommand "/notice " & Nickname & " Already devoiced users: " & Thumb & " - You cannot devoice these users: " & VPthumb & "",ServerNumber Else If not VPthumb = "" then SendCommand "/notice " & Nickname & " You cannot devoice these users: " & VPthumb & "",ServerNumber End If If Not Thumb = "" then SendCommand "/notice " & Nickname & " Already devoiced users: " & Thumb & "",ServerNumber End If End If Lvoc = "7" ElseIf not IsVoice(Vword(Lvoc),words(0),ServerNumber) and not GetIdentifier("$mask($nick(" & words(0) & "," & Vword(Lvoc) & ").mask,2)",ServerNumber)="$null" then Thumb = Thumb + " " & Vword(Lvoc) & "" Elseif GetIniFile("" & Words(0) & ".txt",GetIdentifier("$mask($nick(" & Words(0) & "," & Vword(Lvoc) & ").mask,2)",ServerNumber),"Mod","")="Yes" and not GetIniFile("" & Words(0) & ".txt",GetIdentifier("$mask($nick(" & Words(0) & "," & Vword(Lvoc) & ").mask,2)",ServerNumber),"Host","")=Getidentifier("$mask(" & Nickname & "!" & Host & ",2)") and not IsOp(Nickname,words(0),ServerNumber) then VPthumb = VPthumb + " " & Vword(Lvoc) & "" Elseif not GetIdentifier("$mask($nick(" & words(0) & "," & Vword(Lvoc) & ").mask,2)",ServerNumber)="$null" then Vthumb = Vthumb + " " & Vword(Lvoc) & "" End If Lvoc = Lvoc -- 1 Loop Else SendCommand "/notice " & Nickname & " Error: Not a channel moderator!",ServerNumber End If Case "moderate" If GetIniFile("" & Words(0) & ".txt",Getidentifier("$mask(" & Nickname & "!" & Host & ",2)"),"Admin","") ="Yes" then If Mid(Message,Len(words(0)) -- Len(Words(1)) -- 2) = "" then Sendcommand "/notice " & Nickname & " Error: Please state a user to moderate",ServerNumber ElseIf GetIniFile("" & Words(0) & ".txt",GetIdentifier("$mask($nick(" & Words(0) & "," & Words(2) & ").mask,2)",ServerNumber),"Nick","")="" and GetIniFile("" & Words(0) & ".txt",Words(2),"Host","")="" then SendCommand "/notice " & Nickname & " User " & Words(2) & " does not exist",ServerNumber ElseIf GetIniFile("" & Channel & ".txt",Getidentifier("$mask(" & Nickname & "!" & Host & ",2)"),"Special","")="S" then SendCommand "/notice " & Nickname & " Sorry, you are restricted from using this command!",ServerNumber ElseIf GetIniFile("" & Words(0) & ".txt",GetIdentifier("$mask($nick(" & Words(0) & "," & Words(2) & ").mask,2)",ServerNumber),"Mod","")="Yes" or GetIniFile("" & Words(0) & ".txt",GetIniFile("" & Words(0) & ".txt",Words(2),"Host",""),"Mod","")="Yes" then SendCommand "/notice " & Nickname & " " & Words(2) & " Already has moderation",ServerNumber ElseIf Left(GetIniFile("" & Words(0) & ".txt",GetIdentifier("$mask($nick(" & Words(0) & "," & Words(2) & ").mask,2)",ServerNumber),"Host",""),1)="s" or Left(GetIniFile("" & Words(0) & ".txt",GetIniFile("" & Words(0) & ".txt",Words(2),"Host",""),"Host",""),1)="s" then SendCommand "/notice " & Nickname & " " & Words(2) & " is suspended!",ServerNumber ElseIf not GetIniFile("" & Words(0) & ".txt",GetIdentifier("$mask($nick(" & Words(0) & "," & Words(2) & ").mask,2)",ServerNumber),"Host","")="" then WriteIniFile"" & Words(0) & ".txt",GetIdentifier("$mask($nick(" & Words(0) & "," & Words(2) & ").mask,2)",ServerNumber),"Mod","Yes" SendCommand "/notice " & Nickname & " " & Words(2) & " is now a moderator",ServerNumber If GetIniFile("" & Words(0) & ".txt","op","Set","")="2" then SendCommand "/mode " & Words(0) & " +o " & Words(2) & "",ServerNumber End If Else WriteIniFile"" & Words(0) & ".txt",GetIniFile("" & Words(0) & ".txt",Words(2),"Host",""),"Mod","Yes" SendCommand "/notice " & Nickname & " " & Words(2) & " is now a moderator",ServerNumber If GetIniFile("" & Words(0) & ".txt","op","Set","")="2" then SendCommand "/mode " & Words(0) & " +o " & Words(2) & "",ServerNumber End If End If Else SendCommand "/notice " & Nickname & " Error: Not a channel admin!",ServerNumber End If Case "demoderate" If GetIniFile("" & Words(0) & ".txt",Getidentifier("$mask(" & Nickname & "!" & Host & ",2)"),"Admin","") ="Yes" then If Mid(Message,Len(words(0)) -- Len(Words(1)) -- 2) = "" then Sendcommand "/notice " & Nickname & " Error: Please state a user to demoderate",ServerNumber ElseIf GetIniFile("" & Words(0) & ".txt",GetIdentifier("$mask($nick(" & Words(0) & "," & Words(2) & ").mask,2)",ServerNumber),"Nick","")="" and GetIniFile("" & Words(0) & ".txt",Words(2),"Host","")="" then SendCommand "/notice " & Nickname & " User " & Words(2) & " does not exist",ServerNumber ElseIf GetIniFile("" & Channel & ".txt",Getidentifier("$mask(" & Nickname & "!" & Host & ",2)"),"Special","")="S" then SendCommand "/notice " & Nickname & " Sorry, you are restricted from using this command!",ServerNumber ElseIf GetIniFile("" & Words(0) & ".txt",GetIdentifier("$mask($nick(" & Words(0) & "," & Words(2) & ").mask,2)",ServerNumber),"Protect","")="Yes" or GetIniFile("" & Words(0) & ".txt",GetIniFile("" & Words(0) & ".txt",Words(2),"Host",""),"Protect","")="Yes" then SendCommand "/notice " & Nickname & " " & Words(2) & " is protected!",ServerNumber ElseIf GetIniFile("" & Words(0) & ".txt",GetIdentifier("$mask($nick(" & Words(0) & "," & Words(2) & ").mask,2)",ServerNumber),"Mod","")="No" or GetIniFile("" & Words(0) & ".txt",GetIniFile("" & Words(0) & ".txt",Words(2),"Host",""),"Mod","")="No" then SendCommand "/notice " & Nickname & " " & Words(2) & " is not a moderator",ServerNumber ElseIf GetIniFile("" & Words(0) & ".txt",GetIdentifier("$mask($nick(" & Words(0) & "," & Words(2) & ").mask,2)",ServerNumber),"Admin","")="Yes" or GetIniFile("" & Words(0) & ".txt",GetIniFile("" & Words(0) & ".txt",Words(2),"Host",""),"Admin","")="Yes" then If GetIniFile("" & Words(0) & ".txt",Getidentifier("$mask(" & Nickname & "!" & Host & ",2)"),"Protect","")="Yes" then If not GetIniFile("" & Words(0) & ".txt",GetIdentifier("$mask($nick(" & Words(0) & "," & Words(2) & ").mask,2)",ServerNumber),"Host","")="" then WriteIniFile"" & Words(0) & ".txt",GetIdentifier("$mask($nick(" & Words(0) & "," & Words(2) & ").mask,2)",ServerNumber),"Mod","No" WriteIniFile"" & Words(0) & ".txt",GetIdentifier("$mask($nick(" & Words(0) & "," & Words(2) & ").mask,2)",ServerNumber),"Admin","No" SendCommand "/notice " & Nickname & " " & Words(2) & " is no longer a moderator or admin",ServerNumber SendCommand "/mode " & Words(0) & " -o " & Words(2) & "",ServerNumber SendCommand "/mode " & Words(0) & " +v " & Words(2) & "",ServerNumber Else WriteIniFile"" & Words(0) & ".txt",GetIniFile("" & Words(0) & ".txt",Words(2),"Host",""),"Mod","No" WriteIniFile"" & Words(0) & ".txt",GetIniFile("" & Words(0) & ".txt",Words(2),"Host",""),"Admin","No" SendCommand "/notice " & Nickname & " " & Words(2) & " is no longer a moderator or admin",ServerNumber SendCommand "/mode " & Words(0) & " -o " & Words(2) & "",ServerNumber SendCommand "/mode " & Words(0) & " +v " & Words(2) & "",ServerNumber End If Else SendCommand "/notice " & Nickname & " Error: You cannot delete this admin!",ServerNumber End If ElseIf not GetIniFile("" & Words(0) & ".txt",GetIdentifier("$mask($nick(" & Words(0) & "," & Words(2) & ").mask,2)",ServerNumber),"Host","")="" then WriteIniFile"" & Words(0) & ".txt",GetIdentifier("$mask($nick(" & Words(0) & "," & Words(2) & ").mask,2)",ServerNumber),"Mod","No" SendCommand "/notice " & Nickname & " " & Words(2) & " is no longer a moderator",ServerNumber SendCommand "/mode " & Words(0) & " -o " & Words(2) & "",ServerNumber Else WriteIniFile"" & Words(0) & ".txt",GetIniFile("" & Words(0) & ".txt",Words(2),"Host",""),"Mod","No" SendCommand "/notice " & Nickname & " " & Words(2) & " is no longer a moderator",ServerNumber SendCommand "/mode " & Words(0) & " -o " & Words(2) & "",ServerNumber End If Else SendCommand "/notice " & Nickname & " Error: Not a channel admin!",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 SendCommand "/notice " & nickname & " Setup error: We must both be opped!",ServerNumber Elseif Mid(Message,Len(Words(0)) + Len(words(0)) -- 3)="" then Sendcommand "/notice " & Nickname & " Please state a password to use",ServerNumber Elseif not Len(Words(2)) > "5" then Sendcommand "/notice " & 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",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) SendCommand "/notice " & Nickname & " You are now registered as " & Nickname & " $mask($nick(" & words(0) & "," & Nickname & ").mask,2) ",ServerNumber Sendcommand "/notice " & Nickname & " Your command access list can be found using " & Tool & "Help. Get info about a command via " & Tool & "Help ",ServerNumber Sendcommand "/notice " & Nickname & " Check to make sure everything worked right by typing " & Tool & "Botinfo. Thank you for using authscript!",ServerNumber End If Case "admin" If GetIniFile("" & Words(0) & ".txt",Getidentifier("$mask(" & Nickname & "!" & Host & ",2)"),"Protect","") ="Yes" then If Mid(Message,Len(Words(0)) + Len(words(1)) -- 3)="" then Sendcommand "/notice " & nickname & " Error: Please state a user to admin",ServerNumber ElseIf GetIniFile("" & Words(0) & ".txt",GetIdentifier("$mask($nick(" & Words(0) & "," & Words(2) & ").mask,2)",ServerNumber),"Nick","")="" and GetIniFile("" & Words(0) & ".txt",Words(2),"Host","")="" then SendCommand "/notice " & Nickname & " User " & Words(2) & " does not exist",ServerNumber ElseIf GetIniFile("" & Words(0) & ".txt",GetIdentifier("$mask($nick(" & Words(0) & "," & Words(2) & ").mask,2)",ServerNumber),"Admin","")="Yes" or GetIniFile("" & Words(0) & ".txt",GetIniFile("" & Words(0) & ".txt",Words(2),"Host",""),"Admin","")="Yes" then SendCommand "/notice " & Nickname & " " & Words(2) & " Already has admin",ServerNumber ElseIf Left(GetIniFile("" & Words(0) & ".txt",GetIdentifier("$mask($nick(" & Words(0) & "," & Words(2) & ").mask,2)",ServerNumber),"Host",""),1)="s" or Left(GetIniFile("" & Words(0) & ".txt",GetIniFile("" & Words(0) & ".txt",Words(2),"Host",""),"Host",""),1)="s" then SendCommand "/notice " & Nickname & " " & Words(2) & " is suspended!",ServerNumber ElseIf not GetIniFile("" & Words(0) & ".txt",GetIdentifier("$mask($nick(" & Words(0) & "," & Words(2) & ").mask,2)",ServerNumber),"Host","")="" then If GetIniFile("" & Words(0) & ".txt",GetIdentifier("$mask($nick(" & Words(0) & "," & Words(2) & ").mask,2)",ServerNumber),"Mod","")="No" then WriteIniFile"" & Words(0) & ".txt",GetIdentifier("$mask($nick(" & Words(0) & "," & Words(2) & ").mask,2)",ServerNumber),"Mod","Yes" End If WriteIniFile"" & Words(0) & ".txt",GetIdentifier("$mask($nick(" & Words(0) & "," & Words(2) & ").mask,2)",ServerNumber),"Admin","Yes" If not GetIniFile("" & Words(0) & ".txt","op","Set","")="0" then SendCommand "/mode " & Words(0) & " +o " & Words(2) & "",ServerNumber End If SendCommand "/notice " & Nickname & " " & Words(2) & " Now has admin",ServerNumber Else If GetIniFile("" & Words(0) & ".txt",GetIniFile("" & Words(0) & ".txt",Words(2),"Host",""),"Mod","")="No" then WriteIniFile"" & Words(0) & ".txt",GetIniFile("" & Words(0) & ".txt",Words(2),"Host",""),"Mod","Yes" End If WriteIniFile"" & Words(0) & ".txt",GetIniFile("" & Words(0) & ".txt",Words(2),"Host",""),"Admin","Yes" If not GetIniFile("" & Words(0) & ".txt","op","Set","")="0" then SendCommand "/mode " & Words(0) & " +o " & Words(2) & "",ServerNumber End If SendCommand "/notice " & Nickname & " " & Words(2) & " Now has admin",ServerNumber End If Else SendCommand "/notice " & Nickname & " Error: Not a channel owner!",ServerNumber End If Case "deadmin" If GetIniFile("" & Words(0) & ".txt",Getidentifier("$mask(" & Nickname & "!" & Host & ",2)"),"Protect","") ="Yes" then If Mid(Message,Len(Words(0)) + Len(words(1)) -- 3)="" then Sendcommand "/notice " & nickname & " Error: Please state a user to deadmin",ServerNumber ElseIf GetIniFile("" & Words(0) & ".txt",GetIdentifier("$mask($nick(" & Words(0) & "," & Words(2) & ").mask,2)",ServerNumber),"Nick","")="" and GetIniFile("" & Words(0) & ".txt",Words(2),"Host","")="" then SendCommand "/notice " & Nickname & " User " & Words(2) & " does not exist",ServerNumber ElseIf GetIniFile("" & Words(0) & ".txt",GetIdentifier("$mask($nick(" & Words(0) & "," & Words(2) & ").mask,2)",ServerNumber),"Protect","")="Yes" or GetIniFile("" & Words(0) & ".txt",GetIniFile("" & Words(0) & ".txt",Words(2),"Host",""),"Protect","")="Yes" then SendCommand "/notice " & Nickname & " " & Words(2) & " is protected!",ServerNumber ElseIf GetIniFile("" & Words(0) & ".txt",GetIdentifier("$mask($nick(" & Words(0) & "," & Words(2) & ").mask,2)",ServerNumber),"Admin","")="No" or GetIniFile("" & Words(0) & ".txt",GetIniFile("" & Words(0) & ".txt",Words(2),"Host",""),"Admin","")="No" then SendCommand "/notice " & Nickname & " " & Words(2) & " Does not have admin",ServerNumber ElseIf not GetIniFile("" & Words(0) & ".txt",GetIdentifier("$mask($nick(" & Words(0) & "," & Words(2) & ").mask,2)",ServerNumber),"Host","")="" then WriteIniFile"" & Words(0) & ".txt",GetIdentifier("$mask($nick(" & Words(0) & "," & Words(2) & ").mask,2)",ServerNumber),"Admin","No" If not GetIniFile("" & Words(0) & ".txt","op","Set","")="2" then SendCommand "/mode " & Words(0) & " -o " & Words(2) & "",ServerNumber End if SendCommand "/mode " & Words(0) & " +v " & Words(2) & "",ServerNumber SendCommand "/notice " & Nickname & " " & Words(2) & " No longer has admin",ServerNumber Else WriteIniFile"" & Words(0) & ".txt",GetIniFile("" & Words(0) & ".txt",Words(2),"Host",""),"Admin","No" SendCommand "/mode " & Words(0) & " -o " & Words(2) & "",ServerNumber SendCommand "/mode " & Words(0) & " +v " & Words(2) & "",ServerNumber SendCommand "/notice " & Nickname & " " & Words(2) & " No longer has admin",ServerNumber End If Else SendCommand "/notice " & Nickname & " Error: Not a channel owner!",ServerNumber End if Case "deluser" If GetIniFile("" & words(0) & ".txt",Getidentifier("$mask(" & Nickname & "!" & Host & ",2)"),"Admin","") ="Yes" then If Mid(Message,Len(Words(0)) + Len(words(1)) -- 3)="" then Sendcommand "/notice " & Nickname & " Error: Please state a host or nickname to delete!",ServerNumber ElseIf Left(words(2),3)="*!*" then If GetIniFile("" & words(0) & ".txt",words(2),"Admin","")="" then SendCommand "/Notice " & Nickname & " Host " & words(2) & " does not direct to any user profile!",ServerNumber ElseIf GetIniFile("" & words(0) & ".txt",words(2),"Protect","")="Yes" then SendCommand "/notice " & Nickname & " Error: This user is protected!",ServerNumber ElseIf GetIniFile("" & words(0) & ".txt",Getidentifier("$mask(" & Nickname & "!" & Host & ",2)"),"Special","")="S" then SendCommand "/notice " & Nickname & " Sorry, you are restricted from using this command!",ServerNumber ElseIf Left(GetIniFile("" & words(0) & ".txt",words(2),"Host",""),1)="s" then SendCommand "/notice " & Nickname & " Error: This user is suspended!",ServerNumber Elseif not GetIniFile("" & words(0) & ".txt",Getidentifier("$mask(" & Nickname & "!" & Host & ",2)"),"Protect","") ="Yes" and GetIniFile("" & words(0) & ".txt",words(2),"Admin","")="Yes" then Sendcommand "/notice " & Nickname & " Error: You cannot delete other admins!",ServerNumber Else SendCommand "/Notice " & Nickname & " " & GetIniFile("" & words(0) & ".txt",words(2),"Nick","") & " has been unregistered!",ServerNumber WriteIniFile"" & words(0) & ".txt",GetIniFile("" & words(0) & ".txt",words(2),"Nick",""),"Host","" WriteIniFile"" & words(0) & ".txt",words(2),"Nick", "Unregistered on " & Date & "" WriteIniFile"" & words(0) & ".txt",words(2),"Host", "Unregistered by " & Host & "" WriteIniFile"" & words(0) & ".txt",words(2),"Mod","" WriteIniFile"" & words(0) & ".txt",words(2),"Admin","" WriteIniFile"" & words(0) & ".txt",words(2),"Protect","" WriteIniFile"" & words(0) & ".txt",words(2),"Join","" WriteIniFile"" & words(0) & ".txt",words(2),"Note","" WriteIniFile"" & words(0) & ".txt",words(2),"Seen","" writeinifile"" & words(0) & ".txt",words(2),"Op","" WriteIniFile"" & words(0) & ".txt",words(2),"Special","" End If ElseIf GetIniFile("" & words(0) & ".txt",words(2),"Host","")="" and GetIniFile("" & words(0) & ".txt",GetIdentifier("$mask($nick(" & words(0) & "," & words(2) & ").mask,2)",ServerNumber),"Host","")="" then SendCommand "/Notice " & Nickname & " User " & words(2) & " does not exist",ServerNumber Else If GetIniFile("" & words(0) & ".txt",GetIniFile("" & words(0) & ".txt",GetIdentifier("$mask($nick(" & words(0) & "," & words(2) & ").mask,2)",ServerNumber),"Host",""),"Admin","")="" then SendCommand "/notice " & Nickname & " Please state " & GetIniFile("" & words(0) & ".txt",GetIniFile("" & words(0) & ".txt",words(2),"Host",""),"Nick","") & "'s log to deluser: (" & Tool & "Deluser " & GetIniFile("" & words(0) & ".txt",GetIniFile("" & words(0) & ".txt",words(2),"Host",""),"Host","") & ") ",ServerNumber Else SendCommand "/Notice " & Nickname & " Please state " & GetIniFile("" & words(0) & ".txt",GetIniFile("" & words(0) & ".txt",GetIdentifier("$mask($nick(" & words(0) & "," & words(2) & ").mask,2)",ServerNumber),"Host",""),"Nick","") & "'s log to deluser: (" & Tool & "Deluser " & GetIniFile("" & words(0) & ".txt",GetIniFile("" & words(0) & ".txt",GetIdentifier("$mask($nick(" & words(0) & "," & words(2) & ").mask,2)",ServerNumber),"Host",""),"Host","") & ") ",ServerNumber End If End If Else SendCommand "/notice " & Nickname & " Error: Not a channel admin!",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 SendCommand "/notice " & 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 SendCommand "/notice " & 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 SendCommand "/notice " & 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 SendCommand "/notice " & 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 SendCommand "/notice " & 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 SendCommand "/notice " & 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","Joinmsg","Msg","")="&" and not getIniFile("" & Channel & ".txt","Register","Allowed","")="" then SendCommand "/notice " & Nickname & " " & Channel & ": " & Getinifile("" & Channel & ".txt","Joinmsg","Msg","") & "",ServerNumber 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 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 Sendcommand "/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 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 Sendcommand "/notice " & 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,"0" 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" then Sendcommand "/ignore " & Thumb & "",ServerNumber Sendcommand "/timer " & Thumb & "1 1 30 /ignore " & Thumb & "",ServerNumber Writeinifile"Spammers.txt","Count",Thumb,"0" 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 Sendcommand "/notice " & Nickname & " Error: No permission!",ServerNumber Elseif Getinifile("Settings.txt","Settings","Tool","") = "&" then Sendcommand "/notice " & Nickname & " Error: You already have this as your current tool!",ServerNumber Else writeinifile"Settings.txt","Settings","Tool","&" Sendcommand "/notice " & 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 Sendcommand "/notice " & Nickname & " Error: No permission!",ServerNumber ElseIf Mid(Message,7)="" then Sendcommand "/notice " & 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 Sendcommand "/notice " & Nickname & " Error: Please set your kick number between 5 and 9 messages",ServerNumber Else WriteIniFile"" & Channel & ".txt","Spam","Message",words(2) - 5 Sendcommand "/notice " & 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 Sendcommand "/notice " & Nickname & " Error: Please set your kick time reset between 2 and 6 seconds",ServerNumber Else WriteIniFile"" & Channel & ".txt","Spam","Num",words(2) Sendcommand "/notice " & 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 Sendcommand "/notice " & 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 Sendcommand "/notice " & 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 Sendcommand "/notice " & 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 Sendcommand "/notice " & Nickname & " Error: Already enabled!",ServerNumber Else WriteIniFile"" & Channel & ".txt","Spam","Nospam","On" Sendcommand "/notice " & Nickname & " Spam detection now enabled!",ServerNumber End If ElseIf Lcase(words(2))="0" then If GetIniFile("" & Channel & ".txt","Spam","Nospam","")="Off" then Sendcommand "/notice " & Nickname & " Error: Already disabled!",ServerNumber Else WriteIniFile"" & Channel & ".txt","Spam","Nospam","Off" Sendcommand "/notice " & 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 Sendcommand "/notice " & Nickname & " Error: Already enabled!",ServerNumber Else WriteIniFile"" & Channel & ".txt","Spam","Ops","On" Sendcommand "/notice " & Nickname & " Spam detection for ops now enabled!",ServerNumber End If ElseIf Lcase(words(2))="0" then If GetIniFile("" & Channel & ".txt","Spam","Ops","")="Off" then Sendcommand "/notice " & Nickname & " Error: Already disabled!",ServerNumber Else WriteIniFile"" & Channel & ".txt","Spam","Ops","Off" Sendcommand "/notice " & 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 SendCommand "/notice " & 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 SendCommand "/notice " & Nickname & " Please state an active new owner",ServerNumber ElseIf Mid(Message,Len(words(0)) + Len(words(1)) -- 3)="" then Sendcommand "/notice " & nickname & " Please state a channel that is real",ServerNumber ElseIf not Getinifile("" & words(2) & ".txt","Register","Allowed","")="" then Sendcommand "/notice " & Nickname & " Error: Channel is already registered!",ServerNumber Elseif Mid(Message,Len(words(0)) + Len(words(1)) + len(words(2)) -- 4)="" then Sendcommand "/notice " & 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 SendCommand "/notice " & Nickname & " Allow automatic registration: " & Getinifile("" & Channel & ".txt","Register","Allowed","") & " ; Locked topic: " & Getinifile("" & Channel & ".txt","Topic","Lock","") & " ; Op mode: " & GetIniFile("" & Channel & ".txt","op","Set","") & " ; Userlist Availability: " & dchk & " ; PM commands: " & Getinifile("" & Channel & ".txt","Allowpm","Set","") & "",ServerNumber SendCommand "/notice " & Nickname & " Default topic: " & Getinifile("" & Channel & ".txt","Topic","Ident","") & " Real topic: " & Getinifile("" & Channel & ".txt","Topic","Topic","") & "",ServerNumber If Getinifile("" & Channel & ".txt","Joinmsg","Msg","")="" then SendCommand "/notice " & Nickname & " Greet message: Welcome back (Default) ",ServerNumber ElseIf Getinifile("" & Channel & ".txt","Joinmsg","Msg","")="&" then SendCommand "/notice " & Nickname & " Greet message is disabled",ServerNumber Else SendCommand "/notice " & 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 Sendcommand "/notice " & Nickname & " Main Channel: " & Getinifile("Settings.txt","Settings","Channel","") & " - Registered bot host: " & Getinifile("Settings.txt","Settings","Bhost","") & " - Userlist View Type: " & list & " - Version: " & Ver & "",ServerNumber Else Sendcommand "/notice " & 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 Sendcommand "/notice " & Nickname & " Error: No permission!",ServerNumber ElseIf Mid(Message,7)="" then Sendcommand "/notice " & Nickname & " Error: Please state a character to use for your new tool",ServerNumber ElseIf not Mid(Message,8)="" then Sendcommand "/notice " & Nickname & " Error: Please only use a single character tool!",ServerNumber Elseif Getinifile("Settings.txt","Settings","Tool","") = words(1) then Sendcommand "/notice " & Nickname & " Error: You already have this as your current tool!",ServerNumber Else Writeinifile"Settings.txt","Settings","Tool",Lcase(words(1)) Sendcommand "/notice " & 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 SendCommand "/notice " & 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 SendCommand "/notice " & 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 SendCommand "/notice " & 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 SendCommand "/notice " & 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",ServerNumber ElseIf GetIniFile("" & Channel & ".txt",GetIdentifier("$mask($nick(" & Channel & "," & Nickname & ").mask,2)",ServerNumber),"Admin","")="Yes" then SendCommand "/notice " & 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",ServerNumber SendCommand "/notice " & Nickname & " Admin commands: " & Tool & "Deluser, " & Tool & "Op, " & Tool & "Deop, " & Tool & "Moderate, " & Tool & "Demoderate, " & Tool & "Clearinfo, " & Tool & "Infolock, " & Tool & "Suspend, " & Tool & "Unsuspend, " & Tool & "Spam",ServerNumber If GetIniFile("" & Channel & ".txt",GetIdentifier("$mask($nick(" & Channel & "," & Nickname & ").mask,2)",ServerNumber),"Protect","")="Yes" then If Channel=Getinifile("Settings.txt","Settings","Channel","") then SendCommand "/notice " & 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",ServerNumber Else SendCommand "/notice " & 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",ServerNumber End If End If End If Else Select Case Lcase(words(1)) Case "up" SendCommand "/notice " & Nickname & " Use this to gain the highest attainable user mode in a channel based on your user level and channel settings",ServerNumber Case "down" SendCommand "/notice " & Nickname & " Use this to remove all channel user modes",ServerNumber Case "register" SendCommand "/notice " & Nickname & " Use this to register with the channel and gain basic bot commands",ServerNumber Case "voice" SendCommand "/notice " & Nickname & " Use this to give voice to another user. Shortcut " & Tool & "V",ServerNumber Case "devoice" SendCommand "/notice " & Nickname & " Use this to devoice another user. Shortcut " & Tool & "DV",ServerNumber Case "me" SendCommand "/notice " & Nickname & " Use this to get your own personal account information including your note if you have one",ServerNumber Case "user" SendCommand "/notice " & 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" SendCommand "/notice " & Nickname & " Use this to kick a user from your channel. Shortcut " & Tool & "K",ServerNumber Case "ban" SendCommand "/notice " & Nickname & " Use this to ban an active user from your channel. Shortcut " & Tool & "B",ServerNumber Case "unban" SendCommand "/notice " & Nickname & " Use this to unban an active network user from your channel. Shortcut " & Tool & "UB",ServerNumber Case "undoban" SendCommand "/notice " & 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" SendCommand "/notice " & 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" SendCommand "/notice " & Nickname & " Use this to change the end part of your channel's topic",ServerNumber Case "trefresh" SendCommand "/notice " & Nickname & " Use this to reset the last set topic if it is different than before",ServerNumber Case "greet" SendCommand "/notice " & 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" SendCommand "/notice " & Nickname & " Use this to change your on file nickname to your current one",ServerNumber Case "note" SendCommand "/notice " & 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" SendCommand "/notice " & Nickname & " Use this to get basic channel information such as the topic and greet message",ServerNumber Case "seen" SendCommand "/notice " & Nickname & " Use this to get the date of when a specific user joined last",ServerNumber Case "help" SendCommand "/notice " & 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" SendCommand "/notice " & Nickname & " Use this to remove yourself and all permissions from the specified channel user list",ServerNumber Case "snuggle" SendCommand "/notice " & 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" SendCommand "/notice " & Nickname & " Use this to completely delete a registered user from your channel's user list",ServerNumber Case "op" SendCommand "/notice " & 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" SendCommand "/notice " & Nickname & " Use this to deop a registered user on your channel",ServerNumber Case "moderate" SendCommand "/notice " & Nickname & " Use this to give a registered user moderation control over your channel",ServerNumber Case "demoderate" SendCommand "/notice " & Nickname & " Use this to remove moderation (and admin if present) power from a registered user in your channel",ServerNumber Case "clearinfo" SendCommand "/notice " & Nickname & " Use this to clear a registered user's channel join message",ServerNumber Case "infolock" SendCommand "/notice " & Nickname & " Use this to remove the topic and greet editing permissions from being changed by moderators (Toggled)",ServerNumber Case "suspend" SendCommand "/notice " & 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" SendCommand "/notice " & 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 SendCommand "/notice " & 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 SendCommand "/notice " & 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 SendCommand "/notice " & 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 Sendcommand "/notice " & Nickname & " No viewable help information",ServerNumber End If Case "newchan" SendCommand "/notice " & Nickname & " Use this to register a new channel with an active new owner via " & Tool & "Newchan ",ServerNumber Case "admin" SendCommand "/notice " & Nickname & " Use this to grant admin powers to a registered user on your channel",ServerNumber Case "deadmin" SendCommand "/notice " & Nickname & " Use this to remove admin powers from a registered user on your channel",ServerNumber Case "dtopic" SendCommand "/notice " & Nickname & " Use this to set the default topic in your channel which is also the first part of the topic",ServerNumber Case "setop" SendCommand "/notice " & Nickname & " Use this to set who can claim op status in your channel. 0 is owner only, 1 is admins and up, 2 is mods and up.",ServerNumber Case "registration" SendCommand "/notice " & Nickname & " Use this to allow automatic user registration 1 or disable it 0",Servernumber Case "addban" SendCommand "/notice " & Nickname & " Use this to ban any hostmask or user name without doing a typical user check",ServerNumber Case "restrict" SendCommand "/notice " & Nickname & " Use this to disallow an admin from changing other user permissions",ServerNumber Case "unrestrict" SendCommand "/notice " & Nickname & " Use this to allow an admin to change other user permissions",ServerNumber Case "move" SendCommand "/notice " & 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" SendCommand "/notice " & 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 Sendcommand "/notice " & Nickname & " You can allow searching or in chat viewable content: " & Tool & "Userlist view 0 or " & Tool & "Userlist view 1",ServerNumber End If SendCommand "/notice " & 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" SendCommand "/notice " & Nickname & " Use this to reverse the mode(s) set on a user whether it be op or voice (Case sensitive)",ServerNumber Case "sync" SendCommand "/notice " & Nickname & " Use this to set all active channel users to their correct channel modes",ServerNumber Case "fix" SendCommand "/notice " & Nickname & " Use this to set a user to their correct channel mode if it has otherwise been changed (Case sensitive)",ServerNumber Case "tool" SendCommand "/notice " & 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" SendCommand "/notice " & Nickname & " Use this to control whether or not users may use bot commands via PM (0 or 1)",ServerNumber Case "spam" SendCommand "/notice " & 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 SendCommand "/notice " & 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" Sendcommand "/notice " & 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" Sendcommand "/notice " & Nickname & " Use this to view the registered users in a channel",ServerNumber Case "botinfo" SendCommand "/notice " & Nickname & " Use this to see bot information",ServerNumber Case "banlist" SendCommand "/notice " & 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 Else SendCommand "/notice " & Nickname & " I did not recognize this command. Make sure it is a vald command for authscript",ServerNumber End Select End If Case "register" If not IsVoice(Nickname,Channel,ServerNumber) and not IsOp(Nickname,Channel,ServerNumber) then SendCommand "/notice " & 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 SendCommand "/notice " & 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 SendCommand "/notice " & Nickname & " You cannot register! Reason: You are using a suspended account",ServerNumber ElseIf not GetIniFile("" & Channel & ".txt",Nickname,"Host","") = "" then SendCommand "/notice " & 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) SendCommand "/Notice " & Nickname & " You are now registered as " & Nickname & " $mask($nick(" & Channel & "," & Nickname & ").mask,2) ",ServerNumber Sendcommand "/notice " & Nickname & " Your command access list can be found using " & Tool & "Help. Get info about a command via " & Tool & "Help ",ServerNumber Else SendCommand "/notice " & Nickname & " You cannot register! Reason: Automatic registration disabled",ServerNumber End If Case "yes" If Host=Pass then If Setup="5" then SendCommand "/timer sdog1 off" SendCommand "/timer sdog3 off" 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",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","" Setup="" Pass="" Snick="" Snick2="" SendCommand "/notice " & nickname & " The account has been moved successfully!",ServerNumber End if End If Case "no" If Host=Pass Then If Setup="5" then SendCommand "/timer sdog1 off" SendCommand "/timer sdog3 off" Setup="" Pass="" Snick="" Snick2="" SendCommand "/notice " & nickname & " The account has not been moved or altered!",ServerNumber End if End If Case "allowpm" If not GetIniFile("" & channel & ".txt",GetIdentifier("$mask($nick(" & Channel & "," & Nickname & ").mask,2)",ServerNumber),"Protect","")="Yes" then SendCommand "/notice " & Nickname & " Error: Not a channel owner",ServerNumber Elseif Mid(Message,10) = "" then Sendcommand "/notice " & Nickname & " Please see help information for this command",ServerNumber ElseIf Lcase(words(1))="0" then If GetIniFile("" & Channel & ".txt","Allowpm","Set","")="No" then Sendcommand "/notice " & Nickname & " Error: PM commands have already been disabled!",ServerNumber Else writeIniFile"" & Channel & ".txt","Allowpm","Set","No" Sendcommand "/notice " & Nickname & " PM commands are now disabled!",ServerNumber End If ElseIf Lcase(words(1))="1" then If GetIniFile("" & Channel & ".txt","Allowpm","Set","")="Yes" then Sendcommand "/notice " & Nickname & " Error: PM commands have already been enabled!",ServerNumber Else writeIniFile"" & Channel & ".txt","Allowpm","Set","Yes" Sendcommand "/notice " & 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 SendCommand "/notice " & 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","" SendCommand "/mode " & Channel & " -ov " & Nickname & " " & Nickname & "" SendCommand "/msg " & Channel & " You are now unregistered as " & GetIdentifier("$mask($nick(" & Channel & "," & Nickname & ").mask,2)",ServerNumber) & "",ServerNumber End If Else SendCommand "/notice " & Nickname & " You cannot Unregister! Reason: Not registered!",ServerNumber End If Case "userlist" If Mid(Message,11)="" then SendCommand "/notice " & 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 Sendcommand "/notice " & Nickname & " Error: Already set to DCC",ServerNumber Else Writeinifile"Settings.txt","Settings","Users","0" Sendcommand "/notice " & 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 Sendcommand "/notice " & Nickname & " Error: Already set to Chat",ServerNumber Else Writeinifile"Settings.txt","Settings","Users","1" Sendcommand "/notice " & 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" SendCommand "/notice " & Nickname & " Only channel owner may now get the user list",ServerNumber Else SendCommand "/notice " & 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" SendCommand "/notice " & Nickname & " Channel admins and up may now get the user list",ServerNumber Else SendCommand "/notice " & 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" SendCommand "/notice " & Nickname & " Channel moderators and up may now get the user list",ServerNumber Else SendCommand "/notice " & 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" SendCommand "/notice " & Nickname & " Channel users and up may now get the user list",ServerNumber Else SendCommand "/notice " & Nickname & " Error: already set!",ServerNumber End If End If Else SendCommand "/notice " & 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 If GetIniFile("Settings.txt","Settings","Users","")="0" then SendCommand "/notice " & Nickname & " Error: Bot owner has disabled the listing of all users. Please search for users via " & Tool & "User ",ServerNumber Else Sendcommand "/! Ulist " & Nickname & "|" & Channel & "|" & ServerNumber & "" End If ElseIf GetIniFile("" & channel & ".txt",Getidentifier("$mask(" & Nickname & "!" & Host & ",2)"),"Mod","") = "Yes" and GetIniFile("" & channel & ".txt","DCC","Allowed","")>"1" then If GetIniFile("Settings.txt","Settings","Users","")="0" then SendCommand "/notice " & Nickname & " Error: Bot owner has disabled the listing of all users. Please search for users via " & Tool & "User ",ServerNumber Else Sendcommand "/! Ulist " & Nickname & "|" & Channel & "|" & ServerNumber & "" End If ElseIf GetIniFile("" & channel & ".txt",Getidentifier("$mask(" & Nickname & "!" & Host & ",2)"),"Admin","") = "Yes" and GetIniFile("" & channel & ".txt","DCC","Allowed","")>"0" then If GetIniFile("Settings.txt","Settings","Users","")="0" then SendCommand "/notice " & Nickname & " Error: Bot owner has disabled the listing of all users. Please search for users via " & Tool & "User ",ServerNumber Else Sendcommand "/! Ulist " & Nickname & "|" & Channel & "|" & ServerNumber & "" End If Elseif GetIniFile("" & channel & ".txt",Getidentifier("$mask(" & Nickname & "!" & Host & ",2)"),"Protect","") = "Yes" then If GetIniFile("Settings.txt","Settings","Users","")="0" then SendCommand "/notice " & Nickname & " Error: Bot owner has disabled the listing of all users. Please search for users via " & Tool & "User ",ServerNumber Else Sendcommand "/! Ulist " & Nickname & "|" & Channel & "|" & ServerNumber & "" End If Else SendCommand "/notice " & Nickname & " Error: No permission! - " & GetIniFile("" & channel & ".txt","DCC","Allowed","") & "",ServerNumber End If Case "up" If IsOp(Nickname,Channel,ServerNumber) then SendCommand "/notice " & 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 SendCommand "/notice " & 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 SendCommand "/notice " & 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 SendCommand "/notice " & 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 SendCommand "/notice " & 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 SendCommand "/notice " & 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 SendCommand "/notice " & Nickname & " Cannot flip! Reason: Not a channel owner",ServerNumber ElseIf Mid(Message,6)="" then Sendcommand "/notice " & Nickname & " Error: Please state a user",ServerNumber ElseIf Words(1)=GetIdentifier("$Me",ServerNumber) then SendCommand "/notice " & 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 SendCommand "/notice " & 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 SendCommand "/notice " & Nickname & " Cannot fix! Reason: Not a channel moderator",ServerNumber ElseIf Mid(Message,5)="" then Sendcommand "/notice " & Nickname & " Error: Please state a 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(Mid(Message,6),Channel,ServerNumber) or isvoice(Mid(Message,6),Channel,ServerNumber) then SendCommand "/mode " & Channel & " -ov " & Mid(Message,6) & " " & Mid(Message,6) & "",ServerNumber Else SendCommand "/notice " & 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 SendCommand "/notice " & 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 SendCommand "/notice " & 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 SendCommand "/notice " & 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 SendCommand "/notice " & 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 SendCommand "/notice " & 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 SendCommand "/notice " & Nickname & " Error: Nothing to clear!",ServerNumber ElseIf Lcase(Left(Message,10))="&setinfo &" then SendCommand "/notice " & 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 SendCommand "/notice " & Nickname & " I will no longer greet you on channel join",ServerNumber Else SendCommand "/notice " & Nickname & " " & Mid(Message,10) & "",ServerNumber End If End If Else Sendcommand "/notice " & 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 SendCommand "/notice " & 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 SendCommand "/notice " & Nickname & " Error: Not a channel moderator!",ServerNumber End If Else SendCommand "/notice " & 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 Sendcommand "/notice " & 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 SendCommand "/notice " & Nickname & " Error: This user does not exist!",ServerNumber ElseIf not GetIdentifier("$mask($nick(" & Channel & "," & words(1) & ").mask,2)",ServerNumber)="$null" then SendCommand "/notice " & Nickname & " " & Words(1) & " is active on the channel",ServerNumber ElseIf getIniFile("" & Channel & ".txt",GetIniFile("" & Channel & ".txt",words(1),"Host",""),"Seen","")="" then SendCommand "/notice " & Nickname & " Error: This user has insufficient data. Please try again later",ServerNumber Else SendCommand "/notice " & Nickname & " " & Words(1) & " last seen " & getIniFile("" & Channel & ".txt",GetIniFile("" & Channel & ".txt",words(1),"Host",""),"Seen","") & "",ServerNumber End If Else SendCommand "/notice " & 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 SendCommand "/notice " & Nickname & " Error: No Permission",ServerNumber ElseIf Mid(Message,15)="" then Sendcommand "/notice " & 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 SendCommand "/notice " & Nickname & " Error: Not a channel owner!",ServerNumber ElseIf Lcase(Mid(Message,15))="1" then If GetIniFile("" & Channel & ".txt","Register","Allowed","")="Yes" then SendCommand "/notice " & Nickname & " Error: Automatic registration is already enabled",ServerNumber Else writeIniFile"" & Channel & ".txt","Register","Allowed","Yes" SendCommand "/notice " & Nickname & " Automatic registration is now on",ServerNumber End if ElseIf Lcase(Mid(Message,15))="0" then If GetIniFile("" & Channel & ".txt","Register","Allowed","")="No" then SendCommand "/notice " & Nickname & " Error: Automatic registration is already disabled",ServerNumber Else writeIniFile"" & Channel & ".txt","Register","Allowed","No" SendCommand "/notice " & 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 SendCommand "/notice " & Nickname & " Error: Not a channel moderator!",ServerNumber End If Else SendCommand "/notice " & 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 SendCommand "/notice " & 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 SendCommand "/notice " & 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 SendCommand "/notice " & 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 SendCommand "/notice " & 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 SendCommand "/notice " & 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 SendCommand "/notice " & 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 SendCommand "/notice " & Nickname & " Your note has been cleared!",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 SendCommand "/notice " & Nickname & " Error: Nothing to clear!",ServerNumber Else WriteIniFile"" & Channel & ".txt",GetIdentifier("$mask($nick(" & Channel & "," & Nickname & ").mask,2)",ServerNumber),"Note",Mid(Message,7) SendCommand "/notice " & Nickname & " Note: " & Mid(Message,7) & "",ServerNumber End If Else SendCommand "/notice " & Nickname & " Error: No Permission",ServerNumber End If Case "message" If Getinifile("" & Channel & ".txt",GetIdentifier("$mask($nick(" & Channel & "," & Nickname & ").mask,2)",ServerNumber),"Host","")="" then Sendcommand "/notice " & Nickname & " Error: No Permission",ServerNumber ElseIf Mid(Message,10)="" then Sendcommand "/notice " & 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 ElseIf Lcase(Words(1))="check" then 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 Sendcommand "/notice " & Nickname & " You have no received or saved messages",ServerNumber Elseif Unote = "0" then Sendcommand "/notice " & Nickname & " You have " & Snote & " saved messages on " & Mid(Scount,2) & "",ServerNumber If Snote > 40 and not Snote="50" then Sendcommand "/notice " & Nickname & " Warning: You have used more than 80% of your inbox space! Consider deleting messages",ServerNumber Elseif Snote="50" then Sendcommand "/notice " & Nickname & " Warning: Your inbox is full and you will not be able to receive any more messages!",ServerNumber End If Else Sendcommand "/notice " & Nickname & " You have " & Snote & " saved messages, " & Unote & " unread marked with * on " & Mid(Scount,2) & "",ServerNumber If Snote > 40 and not Snote="50" then Sendcommand "/notice " & Nickname & " Warning: You have used more than 80% of your inbox space! Consider deleting messages",ServerNumber Elseif Snote="50" then Sendcommand "/notice " & Nickname & " Warning: Your inbox is full and you will not be able to receive any more messages!",ServerNumber End If End If Loop ElseIf Lcase(Words(1))="read" then If Mid(Message,15)="" then Sendcommand "/notice " & Nickname & " Error: Please state a message number to read",ServerNumber ElseIf Getinifile("Note.txt",GetIdentifier("$mask($nick(" & Channel & "," & Nickname & ").mask,2)",ServerNumber),Mid(Message,15),"")="" then Sendcommand "/notice " & Nickname & " Error: Invalid message",ServerNumber Else Note = Split(Getinifile("Note.txt",GetIdentifier("$mask($nick(" & Channel & "," & Nickname & ").mask,2)",ServerNumber),Mid(Message,15),"")," ") If Left(Getinifile("Note.txt",GetIdentifier("$mask($nick(" & Channel & "," & Nickname & ").mask,2)",ServerNumber),Mid(Message,15),""),1)="&" then Writeinifile"Note.txt",GetIdentifier("$mask($nick(" & Channel & "," & Nickname & ").mask,2)",ServerNumber),Mid(Message,15),Mid(Getinifile("Note.txt",GetIdentifier("$mask($nick(" & Channel & "," & Nickname & ").mask,2)",ServerNumber),Mid(Message,15),""),2) Sendcommand "/notice " & Nickname & " Sent by " & Mid(Note(0),2) & " on " & Note(1) & ": " & Mid(Getinifile("Note.txt",GetIdentifier("$mask($nick(" & Channel & "," & Nickname & ").mask,2)",ServerNumber),Mid(Message,15),""),Len(Note(0)) + Len(Note(1)) -- 3) Else Sendcommand "/notice " & Nickname & " Sent by " & Note(0) & " on " & Note(1) & ": " & Mid(Getinifile("Note.txt",GetIdentifier("$mask($nick(" & Channel & "," & Nickname & ").mask,2)",ServerNumber),Mid(Message,15),""),Len(Note(0)) + Len(Note(1)) -- 3) End If End If ElseIf Lcase(Words(1))="preview" then If Mid(Message,18)="" then Sendcommand "/notice " & Nickname & " Error: Please state a message number to preview",ServerNumber ElseIf Getinifile("Note.txt",GetIdentifier("$mask($nick(" & Channel & "," & Nickname & ").mask,2)",ServerNumber),Mid(Message,18),"")="" then Sendcommand "/notice " & Nickname & " Error: Invalid message",ServerNumber Else Note = Split(Getinifile("Note.txt",GetIdentifier("$mask($nick(" & Channel & "," & Nickname & ").mask,2)",ServerNumber),Mid(Message,18),"")," ") If Left(Getinifile("Note.txt",GetIdentifier("$mask($nick(" & Channel & "," & Nickname & ").mask,2)",ServerNumber),Mid(Message,18),""),1)="&" then Sendcommand "/notice " & Nickname & " Message Info: Sent by " & Mid(Note(0),2) & " on " & Note(1) & "",ServerNumber Else Sendcommand "/notice " & Nickname & " Message Info: Sent by " & Note(0) & " on " & Note(1) & "",ServerNumber End If End If ElseIf Lcase(Words(1))="delete" then If Mid(Message,17)="" then Sendcommand "/notice " & 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 Sendcommand "/notice " & Nickname & " All messages deleted!",ServerNumber End If Loop ElseIf Getinifile("Note.txt",GetIdentifier("$mask($nick(" & Channel & "," & Nickname & ").mask,2)",ServerNumber),Mid(Message,17),"")="" then Sendcommand "/notice " & Nickname & " Error: Invalid message",ServerNumber Else Writeinifile"Note.txt",GetIdentifier("$mask($nick(" & Channel & "," & Nickname & ").mask,2)",ServerNumber),Mid(Message,17),"" Sendcommand "/notice " & Nickname & " Message " & Mid(Message,17) & " erased",ServerNumber End if Elseif Lcase(Words(1))="send" then If Mid(Message,Len(Words(0)) + Len(Words(1)) + Len(Words(2)) -- 4)="" then Sendcommand "/notice " & 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 Sendcommand "/notice " & 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 Sendcommand "/notice " & 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 Sendcommand "/notice " & 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 Sendcommand "/notice " & Nickname & " Draft saved!",ServerNumber Else Sendcommand "/notice " & 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 Sendcommand "/notice " & Nickname & " Error: This user's inbox is full and cannot receive any more messages!",ServerNumber End if Loop End If ElseIf Lcase(Words(1))="block" then If Mid(Message,16)="" then Sendcommand "/notice " & 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 Sendcommand "/notice " & 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 Sendcommand "/notice " & 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" Sendcommand "/notice " & 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" Sendcommand "/notice " & Nickname & " Blocked " & GetIdentifier("$mask($nick(" & Channel & "," & Words(2) & ").mask,2)",ServerNumber) & "",ServerNumber End If ElseIf Lcase(Words(1))="unblock" then If Mid(Message,18)="" then Sendcommand "/notice " & 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 Sendcommand "/notice " & 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 Sendcommand "/notice " & 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",""),"" Sendcommand "/notice " & 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),"" Sendcommand "/notice " & Nickname & " Unlocked " & GetIdentifier("$mask($nick(" & Channel & "," & Words(2) & ").mask,2)",ServerNumber) & "",ServerNumber End If 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 SendCommand "/notice " & 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 SendCommand "/notice " & 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 SendCommand "/notice " & Nickname & " You cannot change your nickname if it's the same!",ServerNumber ElseIf not GetIniFile("" & Channel & ".txt",Nickname,"Host","") = "" then SendCommand "/Notice " & 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) SendCommand "/notice " & Nickname & " You have changed your nickname to " & Nickname & "",ServerNumber End If Else SendCommand "/notice " & Nickname & " Error: No Permission",ServerNumber End if Case "sync" If not GetIniFile("" & channel & ".txt",Getidentifier("$mask(" & Nickname & "!" & Host & ",2)"),"Mod","") ="Yes" then SendCommand "/notice " & 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="ChanServ" 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 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) and 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 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" SendCommand "/notice " & Nickname & " The list is up to date",ServerNumber Else SendCommand "/notice " & 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 Sendcommand "/notice " & Nickname & " Error: Please state " & Tool & "Move ",ServerNumber ElseIf Mid(Message,Len(words(0)) -- Len(words(1)) -- 3)="" then Sendcommand "/notice " & Nickname & " Error: Please state " & Tool & "Move ",ServerNumber ElseIf GetIniFile("" & channel & ".txt",GetIdentifier("$mask($nick(" & channel & "," & words(1) & ").mask,2)",ServerNumber),"Admin","")="" then SendCommand "/notice " & Nickname & " User " & words(1) & " does not exist",ServerNumber ElseIf words(1)=Getidentifier("$me",ServerNumber) or words(2)=Getidentifier("$me",ServerNumber) then SendCommand "/notice " & Nickname & " Error: You cannot perform this action!",Servernumber ElseIf words(1)=Nickname and GetIniFile("" & channel & ".txt",Getidentifier("$mask(" & Nickname & "!" & Host & ",2)"),"Special","") ="Yes" then SendCommand "/notice " & 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 SendCommand "/notice " & Nickname & " " & words(1) & " is suspended!",ServerNumber ElseIf GetIdentifier("$mask($nick(" & channel & "," & words(2) & ").mask,2)",ServerNumber)="$null" then SendCommand "/notice " & Nickname & " Error: You can only move an account to an active user!",ServerNumber ElseIf words(2)=Nickname then SendCommand "/notice " & 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 SendCommand "/notice " & 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 Sendcommand "/notice " & 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 SendCommand "/notice " & Nickname & " WARNING: You will lose all bot control in your channel and trade ownership to " & words(2) & "",ServerNumber End If SendCommand "/notice " & 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 SendCommand "/notice " & 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 SendCommand "/notice " & Nickname & " WARNING: You will lose all bot control in your channel and trade ownership to " & words(2) & "",ServerNumber End If SendCommand "/notice " & 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 SendCommand "/notice " & Nickname & " Error: Not a channel owner!",ServerNumber End If Case "kick", "k" If Mid(Message,6)="" and Lcase(left(Message,6))="" & Tool & "kick" then Sendcommand "/notice " & Nickname & " Error: Please state a nickname to kick",ServerNumber ElseIf Mid(Message,4)="" and Lcase(left(Message,3))="" & Tool & "k" then Sendcommand "/notice " & 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 SendCommand "/notice " & 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 SendCommand "/notice " & 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 SendCommand "/notice " & 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 SendCommand "/notice " & 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 SendCommand "/notice " & Nickname & " Error: Not a channel moderator!",ServerNumber End If Else SendCommand "/notice " & 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 Sendcommand "/notice " & Nickname & " Error: Please state a nickname to unban",ServerNumber ElseIf Mid(Message,5)="" and Lcase(left(Message,3))="" & Tool & "ub" then Sendcommand "/notice " & 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 Sendcommand "/notice " & nickname & " Done",ServerNumber Else SendCommand "/notice " & Nickname & " Error: Not a channel moderator!",ServerNumber End If Else SendCommand "/notice " & 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 Sendcommand "/notice " & nickname & " Error: Please state something",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 SendCommand "/notice " & 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 SendCommand "/notice " & 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 SendCommand "/notice " & 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 SendCommand "/notice " & 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 SendCommand "/notice " & 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 SendCommand "/notice " & 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 SendCommand "/notice " & 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 Sendcommand "/notice " & Nickname & " No specific user found. Searched " & Nfound & ": " & Mid(Ngen,3) & "",ServerNumber Else Sendcommand "/notice " & Nickname & " No users found",ServerNumber End If End If Loop End If Else SendCommand "/notice " & Nickname & " Error: No Permission",ServerNumber End If Case "ban", "b" If Mid(Message,6)="" and Lcase(left(Message,4))="" & Tool & "ban" then Sendcommand "/notice " & Nickname & " Error: Please state a nickname to ban",ServerNumber ElseIf Mid(Message,4)="" and Lcase(left(Message,2))="" & Tool & "b" then Sendcommand "/notice " & 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 SendCommand "/notice " & Nickname & " " & words(1) & " is protected!",ServerNumber ElseIf GetIdentifier("$mask($nick(" & channel & "," & words(1) & ").mask,2)",ServerNumber)="$null" then SendCommand "/notice " & 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 SendCommand "/notice " & 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 SendCommand "/notice " & 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 SendCommand "/notice " & Nickname & " Error: You cannot ban other mods!",ServerNumber Else WriteIniFile"" & Channel & ".txt","Lastban","Ban",GetIdentifier("$mask($nick(" & Channel & "," & words(1) & ").mask,2)",ServerNumber) If LCase(Words(0))="" & Tool & "b" then SendCommand "/mode " & Channel & " +b " & words(1) & "",ServerNumber SendCommand "/kick " & Channel & " " & Mid(Message,4) & " ~ " & Nickname & "",ServerNumber Else SendCommand "/mode " & Channel & " +b " & words(1) & "",ServerNumber SendCommand "/kick " & Channel & " " & Mid(Message,6) & " ~ " & Nickname & "",ServerNumber End If End If Else SendCommand "/notice " & Nickname & " Error: Not a channel moderator!",ServerNumber End If Case "addban" If not GetIniFile("" & channel & ".txt",Getidentifier("$mask(" & Nickname & "!" & Host & ",2)"),"Protect","")="Yes" then SendCommand "/notice " & Nickname & " Error: No permission",ServerNumber Else Bcheck="51" If Mid(Message,Len(words(0)) -- 2)="" then Sendcommand "/notice " & Nickname & " Error: Please state a host or nickname!",SerevrNumber 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 Sendcommand "/notice " & 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 Sendcommand "/notice " & 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 Sendcommand "/notice " & 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 Sendcommand "/notice " & 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(channel) + Len(words(0)) + Len(words(1)) -- 3)="" then Brson = Nickname Else Brson = Mid(Message,Len(channel) + Len(words(0)) + Len(words(1)) -- 3) End if Sendcommand "/notice " & 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 Sendcommand "/notice " & 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 SendCommand "/notice " & Nickname & " Error: No permission",ServerNumber Else Bcheck="51" If Mid(Message,Len(words(0)) -- 2)="" then Sendcommand "/notice " & Nickname & " Error: Please state a host or number!",SerevrNumber ElseIf not Len(words(1)) > 9 then If GetIniFile("" & channel & ".txt","Blist",words(1),"") = "" then Sendcommand "/notice " & 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","" Sendcommand "/notice " & 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 Sendcommand "/notice " & 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 Sendcommand "/notice " & Nickname & " Removed ban(s)",ServerNumber Else Sendcommand "/notice " & 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 Sendcommand "/notice " & Nickname & " Error: Invalid number/Host input is too short!",ServerNumber Elseif Len(words(1)) > 9 then Sendcommand "/! Banlist " & Nickname & "|" & channel & "|" & ServerNumber & "|" & words(1) & "" Else Sendcommand "/notice " & 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 "/notice " & Nickname & " Banlist generator has been disabled by the bot owner! Please see the help info for Banlist",ServerNumber 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 Sendcommand "/notice " & Nickname & " Error: Invalid number/Host input is too short!",ServerNumber Elseif Len(words(1)) > 9 then Sendcommand "/! Banlist " & Nickname & "|" & channel & "|" & ServerNumber & "|" & words(1) & "" Else Sendcommand "/notice " & 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 "/notice " & Nickname & " Banlist generator has been disabled by the bot owner! Please see the help info for Banlist",ServerNumber 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 Sendcommand "/notice " & Nickname & " Error: Invalid number/Host input is too short!",ServerNumber Elseif Len(words(1)) > 9 then Sendcommand "/! Banlist " & Nickname & "|" & channel & "|" & ServerNumber & "|" & words(1) & "" Else Sendcommand "/notice " & 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 "/notice " & Nickname & " Banlist generator has been disabled by the bot owner! Please see the help info for Banlist",ServerNumber 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 Sendcommand "/notice " & Nickname & " Error: Invalid number/Host input is too short!",ServerNumber Elseif Len(words(1)) > 9 then Sendcommand "/! Banlist " & Nickname & "|" & channel & "|" & ServerNumber & "|" & words(1) & "" Else Sendcommand "/notice " & 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 "/notice " & Nickname & " Banlist generator has been disabled by the bot owner! Please see the help info for Banlist",ServerNumber Else Sendcommand "/! Banlist " & Nickname & "|" & channel & "|" & ServerNumber & "|1" End If Else SendCommand "/notice " & 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 Sendcommand "/notice " & Nickname & " Error: No permission",ServerNumber Else Sendcommand "/mode " & channel & " -b *" & GetIniFile("" & channel & ".txt","Lastban","Ban","") & "*",ServerNumber Sendcommand "/notice " & Nickname & " " & GetIniFile("" & channel & ".txt","Lastban","Ban","") & " removed",ServerNumber WriteIniFile"" & channel & ".txt","Lastban","Ban","" End If Else SendCommand "/notice " & 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 Sendcommand "/notice " & 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 Sendcommand "/notice " & Nickname & " " & GetIniFile("" & channel & ".txt","Lastban","Ban","") & " removed",ServerNumber WriteIniFile"" & channel & ".txt","Lastban","Ban","" End If Else SendCommand "/notice " & Nickname & " Error: No recent ban!",ServerNumber End If Else Sendcommand "/notice " & 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 Sendcommand "/notice " & 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 SendCommand "/notice " & 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 SendCommand "/notice " & Nickname & " Error: You cannot suspend other admins!",ServerNumber ElseIf GetIniFile("" & Channel & ".txt",GetIdentifier("$mask($nick(" & Channel & "," & Nickname & ").mask,2)",ServerNumber),"Special","")="S" then SendCommand "/notice " & 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 SendCommand "/notice " & 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 SendCommand "/notice " & 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 SendCommand "/notice " & 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 & "" SendCommand "/notice " & 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) 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 & "" SendCommand "/notice " & 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) then sendcommand "/mode " & Channel & " -v " & Mid(Message,10) & "",ServerNumber End If Else SendCommand "/notice " & 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 Sendcommand "/notice " & 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 SendCommand "/notice " & Nickname & " User " & Mid(Message,12) & " does not exist",ServerNumber ElseIf GetIniFile("" & Channel & ".txt",GetIdentifier("$mask($nick(" & Channel & "," & Nickname & ").mask,2)",ServerNumber),"Special","")="S" then SendCommand "/notice " & 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 SendCommand "/notice " & 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 SendCommand "/notice " & 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 SendCommand "/notice " & 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 SendCommand "/notice " & 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 SendCommand "/notice " & Nickname & " User unsuspended!",ServerNumber sendcommand "/mode " & Channel & " +v " & Mid(Message,12) & "",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 SendCommand "/notice " & Nickname & " User unsuspended!",ServerNumber sendcommand "/mode " & Channel & " +v " & Mid(Message,12) & "",ServerNumber End If Else SendCommand "/notice " & 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 SendCommand "/Notice " & 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 SendCommand "/notice " & 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 SendCommand "/notice " & 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 SendCommand "/notice " & 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" SendCommand "/notice " & Nickname & " User is now on admin restrictions!",ServerNumber Else WriteIniFile"" & Channel & ".txt",GetIdentifier("$mask($nick(" & Channel & "," & Mid(Message,11) & ").mask,2)",ServerNumber),"Special","S" SendCommand "/notice " & Nickname & " User is now on admin restrictions!",ServerNumber End If Else SendCommand "/notice " & 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 SendCommand "/Notice " & 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 SendCommand "/notice " & 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 SendCommand "/notice " & 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","" SendCommand "/notice " & Nickname & " User is no longer on admin restrictions!",ServerNumber Else WriteIniFile"" & Channel & ".txt",GetIdentifier("$mask($nick(" & Channel & "," & Mid(message,13) & ").mask,2)",ServerNumber),"Special","" SendCommand "/notice " & Nickname & " User is no longer on admin restrictions!",ServerNumber End If Else SendCommand "/notice " & 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 SendCommand "/notice " & Nickname & " Cannot change greet! Reason: Locked by an admin",ServerNumber ElseIf Mid(Message,8)="" and Getinifile("" & Channel & ".txt","Joinmsg","Msg","")="" then SendCommand "/notice " & Nickname & " Error: Nothing to clear",ServerNumber Elseif Lcase(Mid(Message,8))="0" and Getinifile("" & Channel & ".txt","Joinmsg","Msg","")="&" then SendCommand "/notice " & nickname & " Error: Greet is already off!",ServerNumber Elseif Mid(Message,8)="" then Writeinifile"" & Channel & ".txt","Joinmsg","Msg","Welcome back!" SendCommand "/notice " & Nickname & " Default Greet message used", ServerNumber ElseIf Lcase(Mid(Message,8))="0" then Writeinifile"" & Channel & ".txt","Joinmsg","Msg","&" SendCommand "/notice " & Nickname & " Greet message off", ServerNumber Else Writeinifile"" & Channel & ".txt","Joinmsg","Msg",Mid(Message,8) SendCommand "/notice " & Nickname & " " & Mid(Message,8) & "", ServerNumber End if Else SendCommand "/notice " & 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 GetIniFile("" & Channel & ".txt","Topic","Lock","")="On" then WriteIniFile"" & Channel & ".txt","Topic","Lock","Off" SendCommand "/notice " & Nickname & " Info is now free to edit!",ServerNumber ElseIf GetIniFile("" & Channel & ".txt","Topic","Lock","")="Off" then WriteIniFile"" & Channel & ".txt","Topic","Lock","On" SendCommand "/notice " & Nickname & " Info is now locked to editors!",ServerNumber End If Else SendCommand "/notice " & 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 SendCommand "/notice " & 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 & " ||" SendCommand "/notice " & Nickname & " Default topic ident used!",ServerNumber End If ElseIf not Mid(Message,9)="" then If Getinifile("" & Channel & ".txt","Topic","Ident","")= Mid(Message,9) then SendCommand "/notice " & 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 SendCommand "/notice " & 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 Sendcommand "/notice " & 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 SendCommand "/Notice " & 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 SendCommand "/notice " & 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 SendCommand "/notice " & 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 SendCommand "/notice " & 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","") & "" SendCommand "/notice " & 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","") & "" SendCommand "/notice " & Nickname & " Info cleared!",ServerNumber End If Else SendCommand "/notice " & 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 SendCommand "/notice " & Nickname & " Error: You already disabled automatic op for yourself!",ServerNumber Else writeinifile"" & channel & ".txt",Getidentifier("$mask(" & Nickname & "!" & Host & ",2)"),"Op","Off" SendCommand "/notice " & 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 SendCommand "/notice " & Nickname & " Error: You already enabled automatic op for yourself!",ServerNumber Else writeinifile"" & channel & ".txt",Getidentifier("$mask(" & Nickname & "!" & Host & ",2)"),"Op","" SendCommand "/notice " & 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 SendCommand "/notice " & 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 SendCommand "/notice " & 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 SendCommand "/notice " & 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 SendCommand "/notice " & Nickname & " Already deopped users: " & Thumb & " - You cannot deop these users: " & OPthumb & "",ServerNumber Else If not OPthumb = "" then SendCommand "/notice " & Nickname & " You cannot deop these users: " & OPthumb & "",ServerNumber End If If Not Thumb = "" then SendCommand "/notice " & 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 SendCommand "/notice " & Nickname & " Already deopped users: " & Thumb & " - You cannot deop these users: " & OPthumb & "",ServerNumber Else If not OPthumb = "" then SendCommand "/notice " & Nickname & " You cannot deop these users: " & OPthumb & "",ServerNumber End If If Not Thumb = "" then SendCommand "/notice " & 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 SendCommand "/notice " & 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 SendCommand "/notice " & 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 SendCommand "/notice " & 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 SendCommand "/notice " & Nickname & " Already devoiced users: " & Thumb & " - You cannot devoice these users: " & VPthumb & "",ServerNumber Else If Not Thumb = "" then SendCommand "/notice " & Nickname & " Already devoiced users: " & Thumb & "",ServerNumber End If If not VPthumb = "" then SendCommand "/notice " & 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 SendCommand "/notice " & 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 Sendcommand "/notice " & 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 SendCommand "/notice " & 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 SendCommand "/notice " & Nickname & " " & Mid(Message,11) & " Already has moderation",ServerNumber ElseIf GetIniFile("" & Channel & ".txt",GetIdentifier("$mask($nick(" & Channel & "," & Nickname & ").mask,2)",ServerNumber),"Special","")="S" then SendCommand "/notice " & 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 SendCommand "/notice " & 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" SendCommand "/notice " & 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" SendCommand "/notice " & 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 End If Else SendCommand "/notice " & 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 Sendcommand "/notice " & 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 SendCommand "/notice " & 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 SendCommand "/notice " & Nickname & " " & Mid(Message,13) & " is protected!",ServerNumber ElseIf GetIniFile("" & Channel & ".txt",GetIdentifier("$mask($nick(" & Channel & "," & Nickname & ").mask,2)",ServerNumber),"Special","")="S" then SendCommand "/notice " & 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 SendCommand "/notice " & 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" SendCommand "/notice " & 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" SendCommand "/notice " & 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 End If Else SendCommand "/notice " & 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" SendCommand "/notice " & Nickname & " " & Mid(Message,13) & " is no longer a moderator",ServerNumber SendCommand "/mode " & Channel & " -o " & Mid(Message,13) & "",ServerNumber Else WriteIniFile"" & Channel & ".txt",GetIniFile("" & Channel & ".txt",Mid(Message,13),"Host",""),"Mod","No" SendCommand "/notice " & Nickname & " " & Mid(Message,13) & " is no longer a moderator",ServerNumber SendCommand "/mode " & Channel & " -o " & Mid(Message,13) & "",ServerNumber End If Else SendCommand "/notice " & 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 Sendcommand "/notice " & 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 SendCommand "/notice " & 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 SendCommand "/notice " & 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 SendCommand "/notice " & 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 SendCommand "/notice " & 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 SendCommand "/notice " & Nickname & " " & Mid(Message,8) & " Now has admin",ServerNumber End If Else SendCommand "/notice " & 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 Sendcommand "/notice " & 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 SendCommand "/notice " & 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 SendCommand "/notice " & 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 SendCommand "/notice " & 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 SendCommand "/notice " & 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","" SendCommand "/notice " & Nickname & " " & Mid(Message,10) & " No longer has admin",ServerNumber End If Else SendCommand "/notice " & 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 SendCommand "/notice " & Nickname & " Error: Auto op is already set to owner only!",ServerNumber Else writeIniFile"" & Channel & ".txt","op","Set","0" SendCommand "/notice " & 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 SendCommand "/notice " & Nickname & " Error: Auto op is already set to admins and higher!",ServerNumber Else writeIniFile"" & Channel & ".txt","op","Set","1" SendCommand "/notice " & 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 SendCommand "/notice " & Nickname & " Error: Auto op is already set to moderators and higher!",ServerNumber Else writeIniFile"" & Channel & ".txt","op","Set","2" SendCommand "/notice " & Nickname & " Warning: Only channel moderators and higher will now get op (Not recommended)",ServerNumber End If ElseIf Mid(Message,8)="" then SendCommand "/notice " & Nickname & " Error: Please enter/set this mode to either 0,1,2 following the command!",ServerNumber Else SendCommand "/notice " & Nickname & " Error: Please set this mode to either 0,1,2!",ServerNumber End If Else SendCommand "/notice " & 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 Sendcommand "/notice " & 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 SendCommand "/Notice " & Nickname & " Host " & words(1) & " does not direct to any user profile!",ServerNumber ElseIf GetIniFile("" & Channel & ".txt",words(1),"Protect","")="Yes" then SendCommand "/notice " & Nickname & " Error: This user is protected!",ServerNumber ElseIf GetIniFile("" & Channel & ".txt",GetIdentifier("$mask($nick(" & Channel & "," & Nickname & ").mask,2)",ServerNumber),"Special","")="S" then SendCommand "/notice " & Nickname & " Sorry, you are restricted from using this command!",ServerNumber ElseIf Left(GetIniFile("" & Channel & ".txt",words(1),"Host",""),1)="s" then SendCommand "/notice " & 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 Sendcommand "/notice " & Nickname & " Error: You cannot delete other admins!",ServerNumber Else SendCommand "/Notice " & 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 SendCommand "/Notice " & 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 SendCommand "/notice " & 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 SendCommand "/Notice " & 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 SendCommand "/notice " & 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" Sendcommand "/notice " & Nickname & " Nickname - Mod - Admin - Protect - Seen - Host",ServerNumber 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 Sendcommand "/notice " & 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 & "" End If End If Num = Num - 1 If Num < 1 then Sendcommand "/notice " & Nickname & " Listed " & lcount & " registered users, " & lsus & " suspended, " & lmod & " moderators and " & lad & " admins",ServerNumber 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 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 Sendcommand "/notice " & 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 Sendcommand "/notice " & Nickname & " Ban(s) found on line(s): " & Mid(Bgen,2) & "",ServerNumber Else Sendcommand "/notice " & Nickname & " No bans were found matching your criteria",ServerNumber End If End If Loop Else Sendcommand "/notice " & 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 Sendcommand "/notice " & Nickname & " " & GetIniFile("" & channel & ".txt","Blist",Bcheck,"") & " - " & GetIniFile("" & channel & ".txt","Blist","" & Bcheck & "i","") & "",ServerNumber Bgen = Bgen -- 1 End If Else Sendcommand "/notice " & Nickname & " Listed " & Bgen & " bans",ServerNumber End If Loop End If End Sub Sub Newchan(Nickname,Registrar,Channel,ServerNumber,Reason) 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",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) SendCommand "/notice " & Nickname & " You are now registered as " & Nickname & " $mask($nick(" & channel & "," & Nickname & ").mask,2) ",ServerNumber Sendcommand "/notice " & 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","" SendCommand "/notice " & nickname & " The account has been moved successfully!",ServerNumber End Sub Sub ONMODE(Channel,ModeSetter,Mode,ServerNumber) if Modesetter = Getidentifier("$me",servernumber) then exit sub If Mode = "-o " & ModeSetter & "" then exit sub If instr(Mode,"o") then If GetIniFile("" & channel & ".txt",GetIdentifier("$mask($nick(" & channel & "," & ModeSetter & ").mask,2)",ServerNumber),"Admin","") ="Yes" and GetIniFile("" & channel & ".txt","op","Set","")="0" and not GetIniFile("" & channel & ".txt",GetIdentifier("$mask($nick(" & channel & "," & ModeSetter & ").mask,2)",ServerNumber),"Protect","") ="Yes" 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 ElseIf GetIniFile("" & channel & ".txt",GetIdentifier("$mask($nick(" & channel & "," & ModeSetter & ").mask,2)",ServerNumber),"Admin","") ="" or GetIniFile("" & channel & ".txt",GetIdentifier("$mask($nick(" & channel & "," & ModeSetter & ").mask,2)",ServerNumber),"Admin","") ="No" 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 If End Sub