Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
La Quadrature du Net
rpteam
wantzel
Commits
322808e9
Commit
322808e9
authored
May 22, 2018
by
Mindiell
Browse files
#35
: utilisation d'un nouveau système d'appel du timer pour wantzel.
parent
2a7cce3a
Changes
1
Hide whitespace changes
Inline
Side-by-side
wantzel.py
View file @
322808e9
...
...
@@ -9,7 +9,7 @@ Doc : https://wiki.laquadrature.net/Wantzel
import
re
from
irc
import
IrcClientFactory
from
twisted.internet
import
reactor
from
twisted.internet
import
reactor
,
task
import
config
from
logs
import
Log
...
...
@@ -37,8 +37,9 @@ class Wantzel(object):
self
.
irc
=
IrcClientFactory
(
config
)
self
.
irc
.
set_privmsg
=
self
.
set_privmsg
reactor
.
connectTCP
(
config
.
server
,
config
.
port
,
self
.
irc
)
# Prepare timer
reactor
.
callLater
(
config
.
timer
,
self
.
timer
)
# Loop call
self
.
loop
=
reactor
.
LoopingCall
(
self
.
timer
)
self
.
loop
.
start
(
config
.
timer
)
def
timer
(
self
):
"""
...
...
@@ -58,8 +59,6 @@ class Wantzel(object):
self
.
send_message
(
"#lqdn-travail"
,
self
.
monitor
.
wiki_updates
())
# Cleaning points of mastering rp
self
.
rp
.
clean_master_rp
()
# Recalling the timer
reactor
.
callLater
(
config
.
timer
,
self
.
timer
)
def
set_privmsg
(
self
):
"""
...
...
@@ -165,7 +164,7 @@ class Wantzel(object):
if
result
==
"REACTOR"
:
try
:
# Recalling the timer
reactor
.
callLater
(
config
.
timer
,
self
.
timer
)
self
.
loop
.
start
(
config
.
timer
)
except
Exception
:
pass
else
:
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment