repositories
/
cloogle-irc.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
c1bfb7b
)
Put back \r\n in toString of IRCCommand even though it makes the output look weird
author
Camil Staps
<info@camilstaps.nl>
Sun, 8 Oct 2017 13:16:31 +0000
(15:16 +0200)
committer
Camil Staps
<info@camilstaps.nl>
Sun, 8 Oct 2017 13:16:31 +0000
(15:16 +0200)
IRC.icl
patch
|
blob
|
history
IRCBot.icl
patch
|
blob
|
history
diff --git
a/IRC.icl
b/IRC.icl
index
266531a
..
d0a0098
100644
(file)
--- a/
IRC.icl
+++ b/
IRC.icl
@@
-132,7
+132,7
@@
instance toString IRCUser where
toString m = m.irc_nick <+ maybe "" ((<+) "!") m.irc_user
<+ maybe "" ((<+) "@") m.irc_host
instance toString IRCCommand where
toString m = m.irc_nick <+ maybe "" ((<+) "!") m.irc_user
<+ maybe "" ((<+) "@") m.irc_host
instance toString IRCCommand where
- toString m = jon " " (gIRCPrint{|*|} m)
+ toString m = jon " " (gIRCPrint{|*|} m)
+++ "\r\n"
instance toString IRCReplies where toString r = printToString r
instance toString IRCErrors where toString r = printToString r
instance toString IRCReplies where toString r = printToString r
instance toString IRCErrors where toString r = printToString r
diff --git
a/IRCBot.icl
b/IRCBot.icl
index
3ea2f76
..
3b62090
100644
(file)
--- a/
IRCBot.icl
+++ b/
IRCBot.icl
@@
-27,7
+27,7
@@
bot (host, port) start end state bot w
| rpt == TR_NoSuccess
= (Just $ "Could not connect to " +++ host, state, w)
// Send startup commands
| rpt == TR_NoSuccess
= (Just $ "Could not connect to " +++ host, state, w)
// Send startup commands
-# (merr, chan, w) = send
[toString s +++ "\r\n" \\ s <- start]
(fromJust chan) w
+# (merr, chan, w) = send
(map toString start)
(fromJust chan) w
| isError merr = (Just $ fromError merr, state, w)
//Start processing function
# (mer, chan, state, w) = process chan "" state bot w
| isError merr = (Just $ fromError merr, state, w)
//Start processing function
# (mer, chan, state, w) = process chan "" state bot w
@@
-59,7
+59,7
@@
process chan acc state bot w
# (mircc, state, w) = bot msg state w
| isNothing mircc = (Ok (), chan, state, w) // Bot asks to quit
//Possible send the commands
# (mircc, state, w) = bot msg state w
| isNothing mircc = (Ok (), chan, state, w) // Bot asks to quit
//Possible send the commands
- # (merr, chan, w) = send
[toString c +++ "\r\n" \\ c <- fromJust mircc]
chan w
+ # (merr, chan, w) = send
(map toString $ fromJust mircc)
chan w
| isError merr = (Error $ fromError merr, chan, state, w)
//Recurse
= process chan acc state bot w
| isError merr = (Error $ fromError merr, chan, state, w)
//Recurse
= process chan acc state bot w