From 079e6b086df15b6da57fc98f1919f89250588bb0 Mon Sep 17 00:00:00 2001
From: tichadou2015 <tichadou2015@perso.iiens.net>
Date: Mon, 1 Apr 2019 19:18:02 +0200
Subject: [PATCH] wut, really

---
 ircbot.pyc | Bin 17866 -> 18300 bytes
 irclib.pyc | Bin 53329 -> 54148 bytes
 putsch.py  |  37 +++++++++++++++++++++++--------------
 3 files changed, 23 insertions(+), 14 deletions(-)

diff --git a/ircbot.pyc b/ircbot.pyc
index 0921dec3beca7a67503cd480b89fec1be5ed690f..59116e93aa52cdf910c8564ad74c4ca985839306 100644
GIT binary patch
delta 753
zcmX@r&G@H}k%Rd&FV~S*b7D4fY~WzDnS4-9fAd2Q9!4lrjLRF!ocxGaZ1Mu`eGrMs
z`|U+H&*71Use8mLiclxH*^)mOnfpQ@AEvND$R0^%GNZ_2sDY1oB`2$i-bLcMiv5GS
zB1ar%(d11MPoaVbB-g?WohDtv1l71nMRc-<TpE;jU2X=HHA8+UR9}@s4@~hx4$;Xj
z%1KZqAP+uOUIOK9QmKHm#3yH|mO^<4Bt<97sx3z1{ZoTk0+PF;o(+`)nOCO)b4r7d
z*konRI;h+!%^gtIYOQi8%Uin$%6g`q3uV>lz+54#I}a-MM7I;lnx;1&!rC0C?~3fH
zhlZ1&O7e|GCvP;G3g?}JveHcEKv~+RE1@h<*a?}<g7RwZBqqN#ONa5y*Fssr7O)sd
zw9JOZz*nnEShP;JsfMZqCW^@cwuw+)gOKRt_qM4p^Xy>W28kQlr$EK`+rxANQ`qDR
m2bldFjxbN}azyr9mlMo<5oef+W6lSmrfqP6#`@$*t`-0y1QT@t

delta 721
zcmey<$9Srnk%Rd&FISCnQTRrV4IGT7lP?PBZ+_3g$_Qm@bGbm7lQUKLCvWB62bEaG
zqm3*f&G#Q70aCU(fxiGra<iCV5sZ67lYjF$Ax#(;WTvgiGlbU3nW7I6yv_Y$j8LVU
zkBbA@VE0WHk-P_CZPt`p29sx#$z_7duaYZ)vO?u2LRqp3o1l8w6kA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xO{Kv^bCz<NN+c*Xhdam5!!i(#hsk;t@UWv=oKus
zB@>McE&bTi`5u_#9tN_~Ha!|t?L^b<ct*_Bkp=^0r#B3EMt2lVp6<CtA6MV^7NypH
z8Rh2(t`OF7JCId8TENT(`%94Xx7miq5t)a7z-;9406DZinIjw=+e)9aZXAD}FOHWe
LSKN5l%)I13sQ9AZ

diff --git a/putsch.py b/putsch.py
index c4e754f..60bc2f4 100644
--- a/putsch.py
+++ b/putsch.py
@@ -387,7 +387,9 @@ class Boooob(ircbot.SingleServerIRCBot):
 
 					else :
 						serv.privmsg(canal, personne+" a quitté la partie ! BOUH ! ")
-						self.joueurs.remove(personne)
+						if personne in self.joueurs : 
+
+							self.joueurs.remove(personne)
 
 				if "!list" in message :
 					serv.privmsg(canal, "La liste des joueurs est : "+", ".join(self.joueurs))
@@ -536,20 +538,21 @@ class Boooob(ircbot.SingleServerIRCBot):
 							for g in dir(self) :
 								if f in str(getattr(self,g)) and g == "lovers" :
 									serv.privmsg("#lg_putsch", "Les amoureux sont morts ! (coucou "+f+" ! )" )
-								if f in str(getattr(self, g)) and g != "joueurs" and g != "victime" and g != "avote" and g != "lovers" and g != "sorcierevictime" and g != "voleur" :
+								if f in str(getattr(self, g)) and g != "joueurs" and g != "victime" and g != "votes" and g != "avote" and g != "lovers" and g != "sorcierevictime" and g != "voleur" :
 									if f != self.chasseurvictime :
 										serv.privmsg("#lg_putsch" , f+" est decedé cette nuit.. son role : "+g+".")
 										serv.mode("#lg_putsch", "-v "+f)
-										try :
+										if f in self.joueurs : 
+
 											self.joueurs.remove(f)
-										except :
-											print "erreur..."
 										if g == "loups" or g == "villageois" or g == "chasseur":
 											if g == "loups" :
-												self.loups.remove(f)
+												if f in self.loups :
+													self.loups.remove(f)
 												serv.kick("#lg_putsch_loups", f)
 											if g == "villageois" :
-												self.villageois.remove(f)
+												if f in self.villageois :
+													self.villageois.remove(f)
 										else :
 											setattr(self,g, "")
 										
@@ -576,9 +579,11 @@ class Boooob(ircbot.SingleServerIRCBot):
 									if g == "loups" or g == "villageois" :
 										if g == "loups" :
 											serv.kick("#lg_putsch_loups", self.chasseurvictime)
-											self.loups.remove(self.chasseurvictime)
+											if self.chasseurvictime in self.loups :
+												self.loups.remove(self.chasseurvictime)
 										else :
-											self.villageois.remove(self.chasseurvictime)
+											if self.chasseurvictime in self.loups : 
+												self.villageois.remove(self.chasseurvictime)
 									else :
 										setattr(self,g,"")
 
@@ -717,17 +722,21 @@ class Boooob(ircbot.SingleServerIRCBot):
 						if self.chasseurvictime != "" :
 
 							for g in dir(self) :
-								if self.chasseurvictime in str(getattr(self, g)) and g!="joueurs" and g!="victime" and g != "avote" and g != "lovers" and g != "sorcierevictime" and g != "chasseurvictime" :
+								if self.chasseurvictime in str(getattr(self, g)) and g!="joueurs" and g!= "votes" and g!="victime" and g != "avote" and g != "lovers" and g != "sorcierevictime" and g != "chasseurvictime" :
 									serv.privmsg("#lg_putsch", self.chasseur+" Decide donc de se venger sur "+self.chasseurvictime+", dont le role etait : "+g+" ! HEADSHOT !")
 									serv.mode("#lg_putsch" , "-v "+self.chasseurvictime)
-									self.joueurs.remove(self.chasseurvictime)
+									if self.chasseurvictime in self.joueurs : 
+										self.joueurs.remove(self.chasseurvictime)
+
 									self.chasseur = ""
 									if g == "loups" or g == "villageois" :
 										if g == "loups" :
 											serv.kick("#lg_putsch_loups", self.chasseurvictime)
-											self.loups.remove(self.chasseurvictime)
+											if self.chasseurvictime in self.loups :
+												self.loups.remove(self.chasseurvictime)
 										else :
-											self.villageois.remove(self.chasseurvictime)
+											if self.chasseurvictime in self.villageois :
+												self.villageois.remove(self.chasseurvictime)
 									else :
 										setattr(self,g,"")
 						serv.privmsg("#lg_putsch", "Le village va donc se coucher...")
@@ -746,7 +755,7 @@ class Boooob(ircbot.SingleServerIRCBot):
 							if self.votes.count(f) > 0 :
 								serv.privmsg("#lg_putsch", "Le nombre de voix pour "+f+" est :"+str(self.votes.count(f)))
 
-					if "!vote" in message and personne not in self.avote and (message.split(" ")[1] in self.joueurs or message.split(" ")[1] == "random") and personne in self.joueurs :
+					if "!vote" in message and personne not in self.avote and len(message.split(" "))> 1 and (message.split(" ")[1] in self.joueurs or message.split(" ")[1] == "random") and personne in self.joueurs :
 						w = 1
 						if self.canvote == 0 :
 							
-- 
GitLab