summaryrefslogtreecommitdiff
path: root/HsBot
diff options
context:
space:
mode:
Diffstat (limited to 'HsBot')
-rw-r--r--HsBot/General/Render.hs (renamed from HsBot/Render.hs)2
-rw-r--r--HsBot/General/Tools.hs (renamed from HsBot/Tools.hs)2
-rw-r--r--HsBot/IRC/IRConnection.hs (renamed from HsBot/IRC/Connection.hs)2
-rw-r--r--HsBot/IRC/User.hs5
-rw-r--r--HsBot/Logics.hs4
-rw-r--r--HsBot/Logics/IRCKarma.hs27
-rw-r--r--HsBot/Start.hs4
-rw-r--r--HsBot/State.hs2
8 files changed, 8 insertions, 40 deletions
diff --git a/HsBot/Render.hs b/HsBot/General/Render.hs
index 1dc78ba..5768942 100644
--- a/HsBot/Render.hs
+++ b/HsBot/General/Render.hs
@@ -1,4 +1,4 @@
-module HsBot.Render where
+module HsBot.General.Render where
class Render a where
render :: a -> String
diff --git a/HsBot/Tools.hs b/HsBot/General/Tools.hs
index 6f66994..bd13271 100644
--- a/HsBot/Tools.hs
+++ b/HsBot/General/Tools.hs
@@ -1,4 +1,4 @@
-module HsBot.Tools where
+module HsBot.General.Tools where
uniq :: (Eq a) => [a] -> [a]
uniq list =
diff --git a/HsBot/IRC/Connection.hs b/HsBot/IRC/IRConnection.hs
index c4fa7a9..610d333 100644
--- a/HsBot/IRC/Connection.hs
+++ b/HsBot/IRC/IRConnection.hs
@@ -10,7 +10,7 @@ import Text.Printf
import HsBot.Conf
import HsBot.Env
import HsBot.State
-import HsBot.Tools
+import HsBot.General.Tools
import HsBot.IRC.User
data IrcMessage = IrcMessage {
diff --git a/HsBot/IRC/User.hs b/HsBot/IRC/User.hs
index cd6d55f..422f910 100644
--- a/HsBot/IRC/User.hs
+++ b/HsBot/IRC/User.hs
@@ -1,9 +1,8 @@
-module HsBot.User where
+module HsBot.IRC.User where
import List
-import HsBot.Karma
-import HsBot.Render
+import HsBot.General.Render
data User = User {
userName :: String,
diff --git a/HsBot/Logics.hs b/HsBot/Logics.hs
index 5b534e5..01eda7c 100644
--- a/HsBot/Logics.hs
+++ b/HsBot/Logics.hs
@@ -1,10 +1,6 @@
module HsBot.Logics (logicsRun) where
import HsBot.Env
-import HsBot.Logics.IRCKarma
-
-class Logics where
- logicRun :: String -> Env -> IO Env
logicsRun :: String -> Env -> IO Env
logicsRun str env = return (env)
diff --git a/HsBot/Logics/IRCKarma.hs b/HsBot/Logics/IRCKarma.hs
deleted file mode 100644
index 55c74d7..0000000
--- a/HsBot/Logics/IRCKarma.hs
+++ /dev/null
@@ -1,27 +0,0 @@
-module HsBot.Logics.IrcKarma where
-
-import HsBot.Env
-import HsBot.Logics
-
-data Karma = Karma {
- karmaName :: String,
- minPts :: Int,
- minPerc :: Float
- } deriving (Show, Read)
-
-instance Eq Karma where
- x == y = (minPerc x) == (minPerc y) && (minPts x == minPts y)
-
-instance Ord Karma where
- x > y
- | (minPerc x) > (minPerc y) = True
- | otherwise = (minPts x) > (minPts y)
- x < y
- | (minPerc x) < (minPerc y) = True
- | otherwise = (minPts x) < (minPts y)
- x >= y = not (x < y)
- x <= y = not (x > y)
-
-instance Logics Karma where
- logicsRun str env = return (env)
-
diff --git a/HsBot/Start.hs b/HsBot/Start.hs
index 3ea4d1e..228092a 100644
--- a/HsBot/Start.hs
+++ b/HsBot/Start.hs
@@ -5,10 +5,10 @@ import System
import HsBot.Cmd
import HsBot.Conf
import HsBot.Env
-import HsBot.IRC.Connection
+import HsBot.IRC.IRConnection
import HsBot.Logics
import HsBot.State
-import HsBot.Tools
+import HsBot.General.Tools
start :: IO ()
start = do
diff --git a/HsBot/State.hs b/HsBot/State.hs
index 93ca7ef..9d1fa87 100644
--- a/HsBot/State.hs
+++ b/HsBot/State.hs
@@ -3,7 +3,7 @@ module HsBot.State where
import qualified Data.Map as M
import List
-import HsBot.User
+import HsBot.IRC.User
data State = State {
currentChannel :: String,