// Let's see if this works.
// Our regexes
// Whispers: ^\(\<font color\=\'whisper\'\>\[ \<name shortname\=\'(.*?)\' src\=\'whisper\-from\'\>(.*?)\<\/name\> whispers\, \"(.*?)\" to you\. \]\<\/font\>$
// Follow requests: ^\(\<font color\=\'query\'\>\<name shortname\=\'(.*?)\'\>(.*?)\<\/name\> requests permission to follow you\. To accept the request\, \<a href\=\'command\:\/\/lead\'\>click here\<\/a\> or type \`lead and press \<\;enter\>\;\.\<\/font\>$
// Lead requests: ^\(\<font color\=\'query\'\>\<name shortname\=\'(.*?)\'\>(.*?)\<\/name\> requests permission to lead you\. To accept the request\, \<a href\=\'command\:\/\/follow\'\>click here\<\/a\> or type \`follow and press \<\;enter\>\;\.\<\/font\>$
Dim furctempdata, whisper As String
Dim furcwhischk as Integer
furctempdata = me.ReadAll
// Check if we've recieved a whisper (well, duh, we have) and see who it's from
// Also see if anyone wants to lead/follow us.
If InStr( furctempdata, "<font color='whisper'>" ) <> 0 then
Dim ResultString, ResultString2 As String
Dim FurcWhisRegex As RegEx
Dim myMatch As RegExMatch
FurcWhisRegex = New RegEx
FurcWhisRegex.Options.CaseSensitive = True
FurcWhisRegex.Options.TreatTargetAsOneLine = True
FurcWhisRegex.SearchPattern = "^\(\<font color\=\'whisper\'\>\[ \<name shortname\=\'(.*?)\' src\=\'whisper\-from\'\>(.*?)\<\/name\> whispers\, \""(.*?)\"" to you\. \]\<\/font\>$"
myMatch = FurcWhisRegex.Search(furctempdata)
If myMatch <> Nil Then
ResultString = myMatch.SubExpressionString(2)
ResultString2 = myMatch.SubExpressionString(3)
me.Write "wh Kawinma " + ResultString + " " + ResultString2 + chr(13) + chr(10)
me.Poll
End If
// If someone wants to follow us..
ElseIf InStr( furctempdata, "<font color='query'>" ) <> 0 And InStr( furctempdata, "type `lead" ) <> 0 Then
Dim ResultString As String
Dim FurcWhisRegex As RegEx
Dim myMatch As RegExMatch
FurcWhisRegex = New RegEx
FurcWhisRegex.Options.CaseSensitive = True
FurcWhisRegex.Options.TreatTargetAsOneLine = True
FurcWhisRegex.SearchPattern = "^\(\<font color\=\'query\'\>\<name shortname\=\'(.*?)\'\>(.*?)\<\/name\> requests permission to follow you\. To accept the request\, \<a href\=\'command\:\/\/lead\'\>click here\<\/a\> or type \`lead and press \<\;enter\>\;\.\<\/font\>$"
myMatch = FurcWhisRegex.Search(furctempdata)
If myMatch <> Nil Then
ResultString = myMatch.SubExpressionString(2)
me.Write "wh Kawinma " + " " + ResultString + chr(13) + chr(10)
me.Poll
End If
// If someone wants to lead us..
ElseIf InStr( furctempdata, "<font color='query'>" ) <> 0 And InStr( furctempdata, "type `follow" ) <> 0 Then
Dim ResultString As String
Dim FurcWhisRegex As RegEx
Dim myMatch As RegExMatch
FurcWhisRegex = New RegEx
FurcWhisRegex.Options.CaseSensitive = True
FurcWhisRegex.Options.TreatTargetAsOneLine = True
FurcWhisRegex.SearchPattern = "^\(\<font color\=\'query\'\>\<name shortname\=\'(.*?)\'\>(.*?)\<\/name\> requests permission to lead you\. To accept the request\, \<a href\=\'command\:\/\/follow\'\>click here\<\/a\> or type \`follow and press \<\;enter\>\;\.\<\/font\>$"
myMatch = FurcWhisRegex.Search(furctempdata)
If myMatch <> Nil Then
ResultString = myMatch.SubExpressionString(2)
me.Write "wh Kawinma " + " " + ResultString + chr(13) + chr(10)
me.Poll
End If
End If