cinch-imap 0.0.5 → 0.0.6
Sign up to get free protection for your applications and to get access to all the features.
- data/README.md +48 -50
- metadata +2 -2
data/README.md
CHANGED
@@ -1,80 +1,78 @@
|
|
1
|
+
" vim:nu:ai:si:et:ts=2:sw=2
|
1
2
|
Cinch-Imap
|
2
3
|
==========
|
3
4
|
The Cinch Imap Plugin. Poll an IMAP mailbox at a defined interval.
|
4
5
|
|
5
6
|
Change Log
|
6
7
|
----------
|
8
|
+
0.0.6
|
9
|
+
* documentation improvements
|
7
10
|
0.0.5
|
8
|
-
|
9
|
-
|
11
|
+
* bug fixes
|
10
12
|
0.0.4
|
11
|
-
|
12
|
-
|
13
|
-
- Added !monitor version command
|
14
|
-
|
13
|
+
* from_rewrites configuration option added
|
14
|
+
* !monitor showconfig command added
|
15
15
|
0.0.3
|
16
|
-
|
17
|
-
|
18
|
-
- Moved "mark messages read" to a configurable option.
|
16
|
+
* Added configurable prefix based on subject match.
|
17
|
+
* Moved "mark messages read" to a configurable option.
|
19
18
|
|
20
19
|
Required Configuration
|
21
20
|
----------------------
|
22
21
|
|
23
|
-
:host - The IMAP server
|
24
|
-
:user - The user id
|
25
|
-
:password
|
22
|
+
* :host - The IMAP server
|
23
|
+
* :user - The user id
|
24
|
+
* :password - The password
|
26
25
|
|
27
26
|
Optional Configuration
|
28
27
|
----------------------
|
29
28
|
|
30
|
-
:port - The IMAP port. Default to 143.
|
31
|
-
:ssl
|
32
|
-
:interval
|
33
|
-
:mark_as_read
|
29
|
+
* :port - The IMAP port. Default to 143.
|
30
|
+
* :ssl - Use ssl? Default is false.
|
31
|
+
* :interval - Number of seconds between polling. Default is 300.
|
32
|
+
* :mark_as_read - Sets the IMAP :Seen flag on polled messages. Default is true.
|
34
33
|
|
35
34
|
Commands
|
36
35
|
--------
|
37
36
|
|
38
|
-
!monitor on/off - Enable/Disable IMAP polling
|
39
|
-
!monitor status - Issues a status report to the channel
|
40
|
-
!monitor clear - Resets the number of "messages seen" to 0
|
41
|
-
!monitor interval [n] - Set polling interval to n second
|
42
|
-
!monitor showconfig - shows all config options other than password
|
37
|
+
* !monitor on/off - Enable/Disable IMAP polling
|
38
|
+
* !monitor status - Issues a status report to the channel
|
39
|
+
* !monitor clear - Resets the number of "messages seen" to 0
|
40
|
+
* !monitor interval [n] - Set polling interval to n second
|
41
|
+
* !monitor showconfig - shows all config options other than password
|
43
42
|
|
44
43
|
Example Configuration
|
45
44
|
---------------------
|
46
45
|
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
bot.start
|
46
|
+
> # mybot.rb
|
47
|
+
> require 'cinch'
|
48
|
+
> require 'cinch/plugins/imap'
|
49
|
+
>
|
50
|
+
> bot = Cinch::Bot.new do
|
51
|
+
> configure do |c|
|
52
|
+
> c.server = "my.ircserver.tld"
|
53
|
+
> c.nick = "cinch"
|
54
|
+
> c.channels = ["#mychannel"]
|
55
|
+
> c.plugins.plugins = [Cinch::Plugins::Imap]
|
56
|
+
> c.plugins.options[Cinch::Plugins::Imap] = {
|
57
|
+
> :host => 'my.imapserver.tld',
|
58
|
+
> :user => 'me@fqdn.tld',
|
59
|
+
> :password => "l3tm3out",
|
60
|
+
> :port => 993,
|
61
|
+
> :ssl => true,
|
62
|
+
> :subject_matches => {'ERROR' => '!!', 'SUCCESS' => '..'},
|
63
|
+
> :from_rewrites => {
|
64
|
+
> 'this@suchalong.silly.address' => 'foo',
|
65
|
+
> 'another@address.that.bugs.me' => 'bugger',
|
66
|
+
> },
|
67
|
+
> }
|
68
|
+
> end
|
69
|
+
> end
|
70
|
+
>
|
71
|
+
> bot.start
|
74
72
|
|
75
73
|
Now, run your bot.
|
76
74
|
|
77
|
-
ruby mybot.rb
|
75
|
+
> ruby mybot.rb
|
78
76
|
|
79
77
|
WARNING
|
80
78
|
-------
|
@@ -87,4 +85,4 @@ eyes only.
|
|
87
85
|
TODO
|
88
86
|
----
|
89
87
|
|
90
|
-
|
88
|
+
* Figure out how to auto-start this thing
|