Permalink
Browse files

Habilitar tareas

  • Loading branch information...
MarioFinale committed Jun 4, 2018
1 parent 576c1ea commit bc62be1a46d9f9f9bd5f8eef63d5c965d4048403
Showing with 33 additions and 36 deletions.
  1. +33 −36 MainModule.vb
View
@@ -18,38 +18,36 @@ Module MainModule
BotIRC = New IRC_Client(ESWikiBOT.IrcUrl, ESWikiBOT.IrcChannel, ESWikiBOT.IrcNickName, 6667, False, ESWikiBOT.IrcPassword, New ConfigFile(IrcOpPath))
BotIRC.Start()
''Tarea para revisar si hay solicitudes en mediacion informal
'Dim InfMedFunc As New Func(Of IRCMessage())(Function()
' CheckInformalMediation(ESWikiBOT)
' Return {New IRCMessage(ESWikiBOT.IrcNickName, "")}
' End Function)
'Dim InfMedTask As New IRCTask(BotIRC, 600000, True, InfMedFunc, "InfMedFunc")
'InfMedTask.Run()
'Tarea para revisar si hay solicitudes en mediacion informal
Dim InfMedFunc As New Func(Of IRCMessage())(Function()
CheckInformalMediation(ESWikiBOT)
Return {New IRCMessage(ESWikiBOT.IrcNickName, "")}
End Function)
Dim InfMedTask As New IRCTask(BotIRC, 600000, True, InfMedFunc, "InfMedFunc")
InfMedTask.Run()
'Tarea para actualizar plantilla de usuario conectado
'Dim UserStatusFunc As New Func(Of IRCMessage())(Function()
' Dim p As Page = ESWikiBOT.Getpage("Plantilla:Estado usuario")
' Dim actus As New ActiveUsers(ESWikiBOT)
' actus.CheckUsersActivity(p, p)
' Return {New IRCMessage(ESWikiBOT.IrcNickName, "")}
' End Function)
'Dim UserStatusTask As New IRCTask(BotIRC, 600000, True, UserStatusFunc, "UserStatus")
'UserStatusTask.Run()
Dim UserStatusFunc As New Func(Of IRCMessage())(Function()
Dim p As Page = ESWikiBOT.Getpage("Plantilla:Estado usuario")
Dim actus As New ActiveUsers(ESWikiBOT)
actus.CheckUsersActivity(p, p)
Return {New IRCMessage(ESWikiBOT.IrcNickName, "")}
End Function)
Dim UserStatusTask As New IRCTask(BotIRC, 600000, True, UserStatusFunc, "UserStatus")
UserStatusTask.Run()
''Tarea para avisar inactividad de usuario en IRC
'Dim CheckUsersFunc As New Func(Of IRCMessage())(AddressOf CheckUsers)
'Dim CheckUsersIRCTask As New IRCTask(BotIRC, 600000, True, CheckUsersFunc, "CheckUsers")
'CheckUsersIRCTask.Run()
'Tarea para avisar inactividad de usuario en IRC
Dim CheckUsersFunc As New Func(Of IRCMessage())(AddressOf CheckUsers)
Dim CheckUsersIRCTask As New IRCTask(BotIRC, 600000, True, CheckUsersFunc, "CheckUsers")
CheckUsersIRCTask.Run()
''Tarea para actualizar el café temático
'Dim TopicFunc As New Func(Of IRCMessage())(Function()
' UpdateTopics()
' Return {New IRCMessage(ESWikiBOT.IrcNickName, ColoredText("¡Temas actualizados!", "04"))}
' End Function)
'Dim TopicTask As New IRCTask(BotIRC, 21600000, True, TopicFunc, "TopicUpdate")
'TopicTask.Run()
UpdatePageExtracts(True)
'Tarea para actualizar el café temático
Dim TopicFunc As New Func(Of IRCMessage())(Function()
UpdateTopics()
Return {New IRCMessage(ESWikiBOT.IrcNickName, ColoredText("¡Temas actualizados!", "04"))}
End Function)
Dim TopicTask As New IRCTask(BotIRC, 21600000, True, TopicFunc, "TopicUpdate")
TopicTask.Run()
'Tarea para actualizar extractos
Dim UpdateExtractFunc As New Func(Of IRCMessage())(Function()
@@ -59,14 +57,13 @@ Module MainModule
Dim UpdateExtractTask As New IRCTask(BotIRC, 3600000, True, UpdateExtractFunc, "UpdateExtracts")
UpdateExtractTask.Run()
''Tarea para archivar todo
'Dim ArchiveAllFunc As New Func(Of IRCMessage())(Function()
' ArchiveAllInclusions(True)
' Return {New IRCMessage(ESWikiBOT.IrcNickName, " ")}
' End Function)
'Dim ArchiveAllTask As New IRCTask(BotIRC, 86400000, True, ArchiveAllFunc, "ArchiveAll")
'ArchiveAllTask.Run()
'Tarea para archivar todo
Dim ArchiveAllFunc As New Func(Of IRCMessage())(Function()
ArchiveAllInclusions(True)
Return {New IRCMessage(ESWikiBOT.IrcNickName, " ")}
End Function)
Dim ArchiveAllTask As New IRCTask(BotIRC, 86400000, True, ArchiveAllFunc, "ArchiveAll")
ArchiveAllTask.Run()
Do
Dim command As String = Console.ReadLine()

0 comments on commit bc62be1

Please sign in to comment.