repositories
/
cloogle-irc.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Add CTCP ping
[cloogle-irc.git]
/
cloogleirc.icl
diff --git
a/cloogleirc.icl
b/cloogleirc.icl
index
596f8c4
..
980ea11
100644
(file)
--- a/
cloogleirc.icl
+++ b/
cloogleirc.icl
@@
-173,12
+173,13
@@
Start w
| m == "!restart" = (Nothing, w)
| m.[0] == '!'
# (msgs, w) = realProcess (split " " $ m % (1, size m)) w
| m == "!restart" = (Nothing, w)
| m.[0] == '!'
# (msgs, w) = realProcess (split " " $ m % (1, size m)) w
- = (Just $ map (NOTICE recipient) msgs, w)
+ = (Just $ map reply msgs, w)
+ | m % (0,4) == "\001PING" = (Just [reply m], w)
= (Just [], w)
where
= (Just [], w)
where
- re
cipient
= case (\(CSepList [t:_]) -> t.[0]) t of
- '#' -> t
- _ ->
CSepList [user.irc_nick]
+ re
ply
= case (\(CSepList [t:_]) -> t.[0]) t of
+ '#' ->
PRIVMSG
t
+ _ ->
NOTICE user.irc_nick
process` _ (PING t mt) w = (Just [PONG t mt], w)
process` _ _ w = (Just [], w)
process` _ (PING t mt) w = (Just [PONG t mt], w)
process` _ _ w = (Just [], w)