Made some slight changes in order to make the bot's core "compile".
This commit is contained in:
parent
11c2c16835
commit
116c655fdc
4 changed files with 66 additions and 58 deletions
1
HsbotMaster/.gitignore
vendored
1
HsbotMaster/.gitignore
vendored
|
@ -1,2 +1,3 @@
|
||||||
.*.swp
|
.*.swp
|
||||||
Session.vim
|
Session.vim
|
||||||
|
dist
|
||||||
|
|
|
@ -19,8 +19,6 @@ import qualified Data.Map as M
|
||||||
import Data.Time
|
import Data.Time
|
||||||
import System.IO
|
import System.IO
|
||||||
|
|
||||||
import Hsbot.Config
|
|
||||||
|
|
||||||
-- | The Bot monad
|
-- | The Bot monad
|
||||||
type Bot = StateT BotState IO
|
type Bot = StateT BotState IO
|
||||||
|
|
||||||
|
@ -29,7 +27,6 @@ data BotState = BotState
|
||||||
{ botStartTime :: UTCTime -- the bot's uptime
|
{ botStartTime :: UTCTime -- the bot's uptime
|
||||||
, botPlugins :: M.Map String (PluginState, MVar (), ThreadId) -- Loaded plugins
|
, botPlugins :: M.Map String (PluginState, MVar (), ThreadId) -- Loaded plugins
|
||||||
, botChan :: Chan BotMsg -- the bot's communication channel
|
, botChan :: Chan BotMsg -- the bot's communication channel
|
||||||
, botConfig :: [BotConfig] -- the bot's starting config
|
|
||||||
, botResumeData :: MVar BotResumeData -- the necessary data to resume the bot's operations on reboot
|
, botResumeData :: MVar BotResumeData -- the necessary data to resume the bot's operations on reboot
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
30
HsbotMaster/LICENSE
Normal file
30
HsbotMaster/LICENSE
Normal file
|
@ -0,0 +1,30 @@
|
||||||
|
Copyright (c)2010, Julien Dessaux
|
||||||
|
|
||||||
|
All rights reserved.
|
||||||
|
|
||||||
|
Redistribution and use in source and binary forms, with or without
|
||||||
|
modification, are permitted provided that the following conditions are met:
|
||||||
|
|
||||||
|
* Redistributions of source code must retain the above copyright
|
||||||
|
notice, this list of conditions and the following disclaimer.
|
||||||
|
|
||||||
|
* Redistributions in binary form must reproduce the above
|
||||||
|
copyright notice, this list of conditions and the following
|
||||||
|
disclaimer in the documentation and/or other materials provided
|
||||||
|
with the distribution.
|
||||||
|
|
||||||
|
* Neither the name of Julien Dessaux nor the names of other
|
||||||
|
contributors may be used to endorse or promote products derived
|
||||||
|
from this software without specific prior written permission.
|
||||||
|
|
||||||
|
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||||
|
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||||
|
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||||
|
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||||
|
OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||||
|
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||||
|
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||||
|
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||||
|
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||||
|
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||||
|
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
@ -1,63 +1,43 @@
|
||||||
name: hsbot
|
Name: hsbot
|
||||||
version: 0.2.1
|
Version: 0.3
|
||||||
cabal-version: >= 1.8
|
Cabal-version: >=1.2
|
||||||
build-type: Simple
|
Synopsis: A multi-purposes bot.
|
||||||
license: BSD3
|
Description:
|
||||||
license-file: LICENSE
|
|
||||||
copyright: Copyright (c) 2010 Julien Dessaux
|
|
||||||
author: Julien Dessaux
|
|
||||||
maintainer: judessaux@gmail.com
|
|
||||||
homepage: http://code.adyxax.org/hsbot
|
|
||||||
bug-reports: http://code.adyxax.org/hsbot/tracker
|
|
||||||
category: Hsbot
|
|
||||||
synopsis: An multi-purpose bot, mainly an IRC bot
|
|
||||||
description:
|
|
||||||
hsbot is a multi-purpose bot, written slowly, as long as I learned more
|
hsbot is a multi-purpose bot, written slowly, as long as I learned more
|
||||||
haskell. It features IRC integration and some plugins. I tried to design
|
haskell. It features IRC integration and some plugins. I tried to design
|
||||||
a bot architecture as modular and as flexible as possible.
|
a bot architecture as modular and as flexible as possible.
|
||||||
|
Homepage: http://hsbot.adyxax.org/
|
||||||
|
License: BSD3
|
||||||
|
License-file: LICENSE
|
||||||
|
Author: Julien Dessaux
|
||||||
|
Maintainer: judessaux@gmail.com
|
||||||
|
Copyright: Copyright (c) 2010 Julien Dessaux
|
||||||
|
Category: Hsbot
|
||||||
|
Build-type: Simple
|
||||||
|
|
||||||
|
|
||||||
Executable hsbot
|
Executable hsbot
|
||||||
Main-Is: Main.hs
|
Main-is: Main.hs
|
||||||
ghc-options: -Wall
|
Ghc-options: -Wall
|
||||||
extensions: DeriveDataTypeable ScopedTypeVariables
|
Extensions: DeriveDataTypeable ScopedTypeVariables
|
||||||
build-depends: base >= 4.1 && < 5,
|
Build-depends: base >= 4.1 && < 5,
|
||||||
directory >= 1.0,
|
directory >= 1.0,
|
||||||
filepath >= 1.1,
|
filepath >= 1.1,
|
||||||
process >= 1.0,
|
process >= 1.0,
|
||||||
unix >= 2.4
|
unix >= 2.4
|
||||||
|
|
||||||
Library
|
Library
|
||||||
exposed-modules:
|
Ghc-options: -Wall
|
||||||
Hsbot.Config
|
Extensions: DeriveDataTypeable ScopedTypeVariables
|
||||||
Hsbot.Core
|
Exposed-modules: Hsbot.Message,
|
||||||
Hsbot.Irc.Command
|
Hsbot.PluginUtils,
|
||||||
Hsbot.Irc.Config
|
|
||||||
Hsbot.Irc.Core
|
|
||||||
Hsbot.Irc.Message
|
|
||||||
Hsbot.Irc.Plugin
|
|
||||||
Hsbot.Irc.Plugin.Core
|
|
||||||
Hsbot.Irc.Plugin.Dummy
|
|
||||||
Hsbot.Irc.Plugin.Ping
|
|
||||||
Hsbot.Irc.Plugin.Quote
|
|
||||||
Hsbot.Irc.Plugin.Utils
|
|
||||||
Hsbot.Irc.Server
|
|
||||||
Hsbot.Irc.Types
|
|
||||||
Hsbot.Message
|
|
||||||
Hsbot.Plugin
|
|
||||||
Hsbot.PluginUtils
|
|
||||||
Hsbot.Types
|
Hsbot.Types
|
||||||
ghc-options: -Wall
|
Build-depends: base >= 4.1 && < 5,
|
||||||
extensions: DeriveDataTypeable ScopedTypeVariables
|
|
||||||
build-depends: base >= 4.1 && < 5,
|
|
||||||
containers >= 0.3,
|
containers >= 0.3,
|
||||||
directory >= 1.0,
|
|
||||||
filepath >= 1.1,
|
|
||||||
haskell98 >= 1.0,
|
|
||||||
mtl >= 1.1,
|
mtl >= 1.1,
|
||||||
network >= 2.2,
|
time >= 1.1
|
||||||
parsec >= 3.1,
|
|
||||||
random >= 1.0,
|
-- Extra files to be distributed with the package, such as examples or
|
||||||
text >= 0.7,
|
-- a README.
|
||||||
time >= 1.1,
|
-- Extra-source-files:
|
||||||
unix >= 2.4
|
|
||||||
|
|
||||||
|
|
Reference in a new issue