'*************************************************************************************************
'* This source code is the work of Chris Miles and is an active part of Xirc and my
purpose of
'* posting it is to help out other people developing an IRC client!
'*************************************************************************************************
'* This code was a pain to write :) This will change the nicknamelist for modes ,
* +o , +v , -o , -v , +oo , +vv , -oo , -vv ,' you will alse
need the Gettoken()
'* function which I will put in at the bottom , in the code "sline" is the
incoming data
*and Namelist is the nickname list. *
'************************************************************************************************** If Mid$(sline,
InStr(sline, " ") + 1, 4) = "MODE" Then
If GetToken(sline, " ", 4) = "+o" Then
b = GetToken(sline, " ", 5)
For A = 0 To NameList.ListCount - 1
If NameList.List(A) =
"@" & b Then
Exit Sub
End If
If NameList.List(A) =
"+" & b Then
Exit Sub
End If
Next A
Incoming.SelColor = RGB(0, 128, 0)
AddText "*** " & GetToken(sline, " ", 5) & _
" has been OPED by " & Mid$(sline, 2, InStr(sline, "!") - 2)
Incoming.SelColor = "0"
b = GetToken(sline, " ", 5)
For A = 0 To NameList.ListCount - 1
If NameList.List(A) = b Then NameList.RemoveItem A
Next A
NameList.AddItem "@" & GetToken(sline, " ", 5)
End If
b = "@" & mynick.Text
For A = 0 To NameList.ListCount - 1
If NameList.List(A) = b Then
userstatus.Text = "Operator" 'b
opstuff.Enabled = True
End If
Next A
If GetToken(sline, " ",
4) = "-o" Then
b = GetToken(sline, " ", 5)
For A = 0 To NameList.ListCount -
1
If NameList.List(A) = b Then
Exit Sub
End If
If NameList.List(A) =
"+" & b Then
Exit Sub
End If
Next A
Incoming.SelColor = RGB(0, 128, 0)
AddText "*** " & GetToken(sline, " ", 5) & _
" has been DE-OPED by " & Mid$(sline, 2, InStr(sline, "!") - 2)
Incoming.SelColor = "0"
b = "@" & GetToken(sline, " ", 5)
For A = 0 To NameList.ListCount -
1
If NameList.List(A) = b Then NameList.RemoveItem A
Next A
NameList.AddItem GetToken(sline, " ", 5)
End If
If GetToken(sline, " ",
4) = "+v" Then
b = GetToken(sline, " ", 5)
For A = 0 To NameList.ListCount -
1
If NameList.List(A) =
"@" & b Then
Exit Sub
End If
If NameList.List(A) =
"+" & b Then
Exit Sub
End If
Next A
Incoming.SelColor = RGB(0, 128, 0)
AddText "*** " & GetToken(sline, " ", 5) & _
" has been Voiced by " & Mid$(sline, 2, InStr(sline, "!") - 2)
Incoming.SelColor = "0"
b = GetToken(sline, " ", 5)
For A = 0 To NameList.ListCount -
1
If NameList.List(A) = b Then NameList.RemoveItem A
Next A
NameList.AddItem "+" & GetToken(sline, " ", 5)
End If
For A = 0 To NameList.ListCount -
1
b = "+" & mynick.Text
If NameList.List(A) = b Then
userstatus.Text = "Voiced" 'b
End If
Next A
If GetToken(sline, " ",
4) = "-v" Then
b = GetToken(sline, " ", 5)
For A = 0 To NameList.ListCount -
1
If NameList.List(A) = b Then
Exit Sub
End If
If NameList.List(A) =
"@" & b Then
Exit Sub
End If
Next A
Incoming.SelColor = RGB(0, 128, 0)
AddText "*** " & GetToken(sline, " ", 5) & _
" has been Unvoiced by " & Mid$(sline, 2, InStr(sline, "!") - 2)
Incoming.SelColor = "0"
b = "+" & GetToken(sline, " ", 5)
For A = 0 To NameList.ListCount -
1
If NameList.List(A) = b Then NameList.RemoveItem A
Next A
NameList.AddItem GetToken(sline, " ", 5)
End If
If GetToken(sline, " ",
4) = "+oo" Then
'* Sub routine to see If user is
already oped or voiced
b = GetToken(sline, " ", 5)
For A = 0 To NameList.ListCount -
1
If NameList.List(A) =
"@" & b Then
Exit Sub
End If
If NameList.List(A) =
"+" & b Then
Exit Sub
End If
Next A
b = GetToken(sline, " ", 6)
For A = 0 To NameList.ListCount -
1
If NameList.List(A) =
"@" & b Then
Exit Sub
End If
If NameList.List(A) =
"+" & b Then
Exit Sub
End If
Next A
Incoming.SelColor = RGB(0, 128, 0)
AddText "*** " & GetToken(sline, " ", 5) & _
" and " & GetToken(sline, " ", 6) & _
" has been OPED by " & Mid$(sline, 2, InStr(sline, "!") - 2)
Incoming.SelColor = "0"
b = GetToken(sline, " ", 5)
For A = 0 To NameList.ListCount -
1
If NameList.List(A) = b Then NameList.RemoveItem A
Next A
NameList.AddItem "@" & GetToken(sline, " ", 5)
'*
b = GetToken(sline, " ", 6)
For A = 0 To NameList.ListCount -
1
If NameList.List(A) = b Then NameList.RemoveItem A
Next A
NameList.AddItem "@" & GetToken(sline, " ", 6)
End If
If GetToken(sline, " ", 4)
= "-oo" Then
b = GetToken(sline, " ", 5)
For A = 0 To NameList.ListCount -
1
If NameList.List(A) = b Then
Exit Sub
End If
If NameList.List(A) = b Then
Exit Sub
End If
Next A
b = GetToken(sline, " ", 6)
For A = 0 To NameList.ListCount -
1
If NameList.List(A) = b Then
Exit Sub
End If
If NameList.List(A) = b Then
Exit Sub
End If
Next A
Incoming.SelColor = RGB(0, 128, 0)
AddText "*** " & GetToken(sline, " ", 5) & _
" and " & GetToken(sline, " ", 6) & _
" has been DE-OPED by " & Mid$(sline, 2, InStr(sline, "!") - 2)
Incoming.SelColor = "0"
b = "@" & GetToken(sline, " ", 5)
For A = 0 To NameList.ListCount -
1
If NameList.List(A) = b Then NameList.RemoveItem A
Next A
NameList.AddItem GetToken(sline, " ", 5)
b = "@" & GetToken(sline, " ", 6)
For A = 0 To NameList.ListCount -
1
If NameList.List(A) = b Then NameList.RemoveItem A
Next A
NameList.AddItem GetToken(sline, " ", 6)
End If
If GetToken(sline, " ",
4) = "+vv" Then
b = GetToken(sline, " ", 5)
For A = 0 To NameList.ListCount -
1
If NameList.List(A) =
"@" & b Then
Exit Sub
End If
If NameList.List(A) =
"+" & b Then
Exit Sub
End If
Next A
b = GetToken(sline, " ", 6)
For A = 0 To NameList.ListCount -
1
If NameList.List(A) =
"@" & b Then
Exit Sub
End If
If NameList.List(A) =
"+" & b Then
Exit Sub
End If
Next A
Incoming.SelColor = RGB(0, 128, 0)
AddText "*** " & GetToken(sline, " ", 5) & _
" and " & GetToken(sline, " ", 6) & _
" has been Voiced by " & Mid$(sline, 2, InStr(sline, "!") - 2)
Incoming.SelColor = "0"
b = GetToken(sline, " ", 5)
For A = 0 To NameList.ListCount -
1
If NameList.List(A) = b Then NameList.RemoveItem A
Next A
NameList.AddItem "+" & GetToken(sline, " ", 5)
'*
b = GetToken(sline, " ", 6)
For A = 0 To NameList.ListCount -
1
If NameList.List(A) = b Then NameList.RemoveItem A
Next A
NameList.AddItem "+" & GetToken(sline, " ", 6)
End If
If GetToken(sline, " ",
4) = "-vv" Then
b = GetToken(sline, " ", 5)
For A = 0 To NameList.ListCount -
1
If NameList.List(A) = b Then
Exit Sub
End If
If NameList.List(A) = b Then
Exit Sub
End If
Next A
b = GetToken(sline, " ", 6)
For A = 0 To NameList.ListCount -
1
If NameList.List(A) = b Then
Exit Sub
End If
If NameList.List(A) = b Then
Exit Sub
End If
Next A
Incoming.SelColor = RGB(0, 128, 0)
AddText "*** " & GetToken(sline, " ", 5) & _
" and " & GetToken(sline, " ", 6) & _
" has been UnVoiced by " & Mid$(sline, 2, InStr(sline, "!") - 2)
Incoming.SelColor = "0"
b = "+" & GetToken(sline, " ", 5)
For A = 0 To NameList.ListCount -
1
If NameList.List(A) = b Then NameList.RemoveItem A
Next A
NameList.AddItem GetToken(sline, " ", 5)
'*
b = "+" & GetToken(sline, " ", 6)
For A = 0 To NameList.ListCount -
1
If NameList.List(A) = b Then NameList.RemoveItem A
Next A
NameList.AddItem GetToken(sline, " ", 6)
End If
|