GoLoGo
IS-IT--Management
- Feb 4, 2009
- 1
My problem is that myAccess = 999 myFlags = "G" but the script does not work unless myAccess = 10 and myFlags = "G"
what im trying to do is make it so it executes with out problem with any value that myAccess returns that is equal to 10 or greater with or with out myFlags = "G"
what im trying to do is make it so it executes with out problem with any value that myAccess returns that is equal to 10 or greater with or with out myFlags = "G"
Code:
Sub weatherinfo_Event_UserTalk(Username, Flags, Message, Ping)
If Left(LCase(Message), 9) = BotVars.Trigger & "weather " Then
GetDBEntry Username, myAccess, myFlags
If Username = Botvars.Username AND Ping = -4 Then
VetoThisMessage
Else
If myAccess < WeatherAccess and inStr(UCase(myFlags), WeatherFlag) = 0 Then Exit Sub
End If
success = false
Location = Trim(Mid(Message, 10))
Call DisplayTodaysWeather(Location)
End If
If Left(LCase(Message), 10) = BotVars.Trigger & "forecast " Then
GetDBEntry Username, myAccess, myFlags
If Username = Botvars.Username AND Ping = -4 Then
VetoThisMessage
Else
If myAccess < WeatherAccess and inStr(UCase(myFlags), WeatherFlag) = 0 Then Exit Sub
End If
success = false
Location = Trim(Mid(Message, 11))
Call DisplayAllWeather(Location)
End If
End Sub
Sub weatherinfo_Event_WhisperFromUser(Username, Flags, Message)
Call weatherinfo_Event_UserTalk(Username, Flags, Message, -3)
End sub
Sub weatherinfo_Event_PressedEnter(Text)
Call weatherinfo_Event_UserTalk(BotVars.Username, 0, Text, -4)
End Sub