Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
lolbot
Project overview
Project overview
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
5
Issues
5
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
MoxQuizz fans
lolbot
Commits
75b9a019
Commit
75b9a019
authored
Nov 24, 2015
by
Jonathan Harker
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove stink str() conversions.
parent
b77ef20f
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
5 deletions
+5
-5
lolbot.py
lolbot.py
+5
-5
No files found.
lolbot.py
View file @
75b9a019
...
...
@@ -213,8 +213,8 @@ class LolBot(SingleServerIRCBot):
self
.
quiz
+=
1
self
.
tip
=
0
self
.
question
=
random
.
choice
(
self
.
qb
)
print
(
s
tr
(
self
.
question
.
question
)
)
self
.
connection
.
notice
(
self
.
channel
,
"Question
%
s:
%
s"
%
(
self
.
quiz
,
s
tr
(
self
.
question
.
question
)
))
print
(
s
elf
.
question
.
question
)
self
.
connection
.
notice
(
self
.
channel
,
"Question
%
s:
%
s"
%
(
self
.
quiz
,
s
elf
.
question
.
question
))
def
quiz_tip
(
self
):
if
len
(
self
.
question
.
tip
)
>
self
.
tip
:
...
...
@@ -315,10 +315,10 @@ class LolBot(SingleServerIRCBot):
elif
cmd
==
'ask'
:
if
self
.
quiz
:
c
.
notice
(
self
.
channel
,
"Quiz is running. Use halt or quit to stop."
)
c
.
notice
(
self
.
channel
,
s
tr
(
self
.
question
.
question
)
)
c
.
notice
(
self
.
channel
,
s
elf
.
question
.
question
)
elif
isinstance
(
self
.
question
,
Question
):
c
.
notice
(
self
.
channel
,
"There is an unanswered question."
)
c
.
notice
(
self
.
channel
,
s
tr
(
self
.
question
.
question
)
)
c
.
notice
(
self
.
channel
,
s
elf
.
question
.
question
)
else
:
self
.
start_quiz
(
nick
)
...
...
@@ -408,7 +408,7 @@ class LolBot(SingleServerIRCBot):
try
:
(
options
,
args
)
=
getopt
.
getopt
(
sys
.
argv
[
1
:],
'hc:s:p:j:n:d:'
,
[
'help'
,
'config='
,
'server='
,
'port='
,
'join='
,
'nick='
,
'database='
,
])
except
getopt
.
GetoptError
as
err
:
print
(
str
(
err
)
)
print
(
err
)
LolBot
.
usage
()
sys
.
exit
(
2
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a 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