Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
relearn
2014
Commits
d10fbc9b
Commit
d10fbc9b
authored
Jul 11, 2014
by
Arman
Browse files
This code work on the bigplotter
parent
27d8f7fe
Changes
1
Hide whitespace changes
Inline
Side-by-side
circles/reporter.py
View file @
d10fbc9b
...
...
@@ -21,11 +21,12 @@ class ReportPlotBot(irc.bot.SingleServerIRCBot):
if
e
.
target
==
self
.
observechannel
:
#this change the precision of the circle
NbUsers
=
len
(
self
.
channels
[
e
.
target
].
users
())
rng
=
1
+
(
randint
(
0
,
100
)
*
.
01
)
rng
=
randint
(
1
,
7
)
#rng=1+(randint(0,100) * .01)
angle
=
360
/
(
NbUsers
/
rng
)
#choose a random position
pX
=
randint
(
0
,
16158
)
pY
=
randint
(
0
,
11040
)
pX
=
randint
(
-
24050
,
24050
)
pY
=
randint
(
-
17975
,
17975
)
if
e
.
target
==
self
.
observechannel
:
msg
=
e
.
arguments
[
0
]
#this count the length of a message and draws a circle accordingly
...
...
@@ -45,11 +46,11 @@ class ReportPlotBot(irc.bot.SingleServerIRCBot):
pos
=
'PR{0},{0}'
.
format
(
posN
)
c
.
privmsg
(
self
.
plotchannel
,
'DT*,1;SI0.15,0.2;{0};LB{1}*'
.
format
(
pos
,
e
.
source
.
nick
))
def
on_join
(
self
,
c
,
e
):
if
e
.
target
==
self
.
observechannel
:
p
=
randint
(
1
,
4
)
#
def on_join(self, c, e):
#
if e.target == self.observechannel:
#
p=randint(1,4)
#this adds the random pen select on login of new user
c
.
privmsg
(
self
.
plotchannel
,
'SP{0}'
.
format
(
p
))
#
c.privmsg(self.plotchannel, 'SP{0}'.format(p))
...
...
Write
Preview
Supports
Markdown
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