Przeglądaj źródła

refactor for site

tBKwtWS 7 lat temu
rodzic
commit
c0f5defe8c

+ 1 - 1
.eric6project/pyRot.e4q

@@ -1,6 +1,6 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!DOCTYPE UserProject SYSTEM "UserProject-4.0.dtd">
 <!-- eric6 user project file for project pyRot -->
-<!-- Saved: 2018-01-31, 21:43:51 -->
+<!-- Saved: 2018-02-02, 01:26:20 -->
 <!-- Copyright (C) 2018 tBKwtWS,  -->
 <UserProject version="4.0"/>

+ 1 - 10
.eric6project/pyRot.e6t

@@ -1,16 +1,7 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!DOCTYPE Tasks SYSTEM "Tasks-6.0.dtd">
 <!-- eric6 tasks file for project pyRot -->
-<!-- Saved: 2018-02-01, 00:19:48 -->
+<!-- Saved: 2018-02-02, 01:26:20 -->
 <Tasks version="6.0">
   <ProjectScanFilter></ProjectScanFilter>
-  <Task priority="1" completed="False" type="2" uid="{aeb672c5-28c2-4630-9db2-9db0d843520e}">
-    <Summary>WARNING: &quot; + str(message))</Summary>
-    <Description></Description>
-    <Created>2018-02-01, 00:19:45</Created>
-    <Resource>
-      <Filename>common/log.py</Filename>
-      <Linenumber>8</Linenumber>
-    </Resource>
-  </Task>
 </Tasks>

+ 0 - 0
rotbot.py → irc/bot.py


+ 0 - 0
commands/admin.py → irc/commands/admin.py


+ 4 - 4
commands/common.py → irc/commands/common.py

@@ -168,11 +168,11 @@ class GameHelpers():
         joinkarma = (((messages / 19) - joins) / total_xp) /10
         print("Joinkarma: (" + str(messages) + " / 20) - " + str(joins) + " = " + str(joinkarma))
         words_per_message = (total_words / 6) - total_messages
-        print("Words per message: = " + str(words_per_message))
+        print("Words per message: = (" + str(total_words) + " / 6) - " + str(total_messages) + " = " + str(words_per_message))
         characters_per_message = (total_characters / 20) - total_messages
-        print("Characters per message: = " + str(characters_per_message))
-        characters_per_word = ((total_characters / total_words) / 6)
-        print("Characters per word: = " + str(characters_per_word))
+        print("Characters per message: (" + str(total_characters) + " / 20) - " + str(total_messages) + " = " + str(characters_per_message))
+        characters_per_word = (total_characters / 6) - total_words
+        print("Characters per word: (" + str(total_characters) + " / 6) - " + str(total_words) + ") = " + str(characters_per_word))
         chatkarma = ((words_per_message + characters_per_message + characters_per_message + characters_per_word) / total_xp) / 100
         print("Chat karma: ((" + str(words_per_message) + " + " + str(characters_per_message) + " + " + str(characters_per_word) + ") / " + str(total_xp) + ") / 100 = " + str(chatkarma))
         kickkarma = ((given * received) / total_xp) / 2

+ 0 - 0
commands/games.py → irc/commands/games.py


+ 0 - 0
commands/public.py → irc/commands/public.py


+ 0 - 0
commands/statistics.py → irc/commands/statistics.py


+ 0 - 0
common/do_everything_to.py → irc/common/do_everything_to.py


+ 0 - 0
common/log.py → irc/common/log.py


+ 0 - 0
common/networkservices.py → irc/common/networkservices.py


+ 0 - 0
common/queries.py → irc/common/queries.py


+ 0 - 0
common/userstatus.py → irc/common/userstatus.py


+ 0 - 0
events/common.py → irc/events/common.py


+ 0 - 0
events/on_action.py → irc/events/on_action.py


+ 0 - 0
events/on_join.py → irc/events/on_join.py


+ 0 - 0
events/on_kick.py → irc/events/on_kick.py


+ 0 - 0
events/on_mode.py → irc/events/on_mode.py


+ 0 - 0
events/on_nick.py → irc/events/on_nick.py


+ 0 - 0
events/on_pubmsg.py → irc/events/on_pubmsg.py


+ 0 - 0
events/on_welcome.py → irc/events/on_welcome.py


+ 0 - 0
events/on_whoreply.py → irc/events/on_whoreply.py


+ 1 - 1
original_testbot.py → irc/original_testbot.py

@@ -109,4 +109,4 @@ def main():
     bot.start()
 
 if __name__ == "__main__":
-main()
+    main()

+ 25 - 26
pyRot.e4p

@@ -1,48 +1,47 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!DOCTYPE Project SYSTEM "Project-5.1.dtd">
 <!-- eric project file for project pyRot -->
-<!-- Saved: 2018-01-30, 19:14:24 -->
+<!-- Saved: 2018-02-02, 02:00:05 -->
 <!-- Copyright (C) 2018 tBKwtWS,  -->
 <Project version="5.1">
   <Language>en_US</Language>
   <Hash>e4efcb6f94c2972397bee40050ea12454672da34</Hash>
   <ProgLanguage mixed="0">Python3</ProgLanguage>
   <ProjectType>PyQt5</ProjectType>
-  <Description>RotBot</Description>
   <Version>0.1</Version>
   <Author>tBKwtWS</Author>
   <Email></Email>
   <Eol index="0"/>
   <Sources>
-    <Source>commands/admin.py</Source>
-    <Source>commands/common.py</Source>
-    <Source>commands/games.py</Source>
-    <Source>commands/public.py</Source>
-    <Source>commands/statistics.py</Source>
-    <Source>common/do_everything_to.py</Source>
-    <Source>common/log.py</Source>
-    <Source>common/networkservices.py</Source>
-    <Source>common/userstatus.py</Source>
-    <Source>events/common.py</Source>
-    <Source>events/on_action.py</Source>
-    <Source>events/on_join.py</Source>
-    <Source>events/on_kick.py</Source>
-    <Source>events/on_mode.py</Source>
-    <Source>events/on_nick.py</Source>
-    <Source>events/on_pubmsg.py</Source>
-    <Source>events/on_welcome.py</Source>
-    <Source>events/on_whoreply.py</Source>
-    <Source>original_testbot.py</Source>
-    <Source>rotbot.py</Source>
+    <Source>__init__.py</Source>
+    <Source>irc/bot.py</Source>
+    <Source>irc/commands/admin.py</Source>
+    <Source>irc/commands/common.py</Source>
+    <Source>irc/commands/games.py</Source>
+    <Source>irc/commands/public.py</Source>
+    <Source>irc/commands/statistics.py</Source>
+    <Source>irc/common/do_everything_to.py</Source>
+    <Source>irc/common/log.py</Source>
+    <Source>irc/common/networkservices.py</Source>
+    <Source>irc/common/queries.py</Source>
+    <Source>irc/common/userstatus.py</Source>
+    <Source>irc/events/common.py</Source>
+    <Source>irc/events/on_action.py</Source>
+    <Source>irc/events/on_join.py</Source>
+    <Source>irc/events/on_kick.py</Source>
+    <Source>irc/events/on_mode.py</Source>
+    <Source>irc/events/on_nick.py</Source>
+    <Source>irc/events/on_pubmsg.py</Source>
+    <Source>irc/events/on_welcome.py</Source>
+    <Source>irc/events/on_whoreply.py</Source>
+    <Source>irc/original_testbot.py</Source>
   </Sources>
   <Forms/>
   <Translations/>
   <Resources/>
   <Interfaces/>
-  <Others>
-    <Other>pyRot.e4p</Other>
-  </Others>
-  <MainScript>rotbot.py</MainScript>
+  <Others/>
+  <MainScript>irc/bot.py</MainScript>
   <Vcs>
     <VcsType>None</VcsType>
   </Vcs>

+ 0 - 0
sql/create joins.sql → sql_backups/create joins.sql


+ 0 - 0
sql/create kicks.sql → sql_backups/create kicks.sql


+ 0 - 0
sql/create_messages.sql → sql_backups/create_messages.sql


+ 0 - 0
sql/create_users.sql → sql_backups/create_users.sql


+ 0 - 0
pyrot.database.schema.sql → sql_backups/pyrot.database.schema.sql