Commit 68e2223c authored by Thomas Levine's avatar Thomas Levine
Browse files

Merge branch 'spiral' of relearn:git/relearn into a

parents 45ac2aa5 b0d4cd9b
......@@ -23,12 +23,13 @@ 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=randint(1,6)
#rng=1+(randint(0,100) * .01)
rng=randint(1,7)
angle=360/(NbUsers/rng)
#choose a random position
pX=randint(0,16158)
pY=randint(0,11040)
pX=randint(-24050,24050)
pY=randint(-17975,17975)
#radius = 5000
if e.target == self.observechannel:
msg = e.arguments[0]
#this count the length of a message and draws a circle accordingly
......@@ -39,6 +40,7 @@ class ReportPlotBot(irc.bot.SingleServerIRCBot):
#c.privmsg(self.plotchannel,str(todo))
NbWords = len(msg.split())
d=50
#cl=spiral(pX - radius,pY - radius,pX + radius,pY + radius,30,NbWords,angle)
for x in range(0,NbWords):
cl='PA'+str(pX)+','+str(pY)+';CI{0}'.format((d*x)+d)+','+str(angle)
print cl
......@@ -48,11 +50,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))
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment