|
27 | 27 | # #
|
28 | 28 | ##############################################################################
|
29 | 29 |
|
30 |
| -weechat::register( "moc", "Jiri Golembiovsky", "0.4", "GPL", |
| 30 | +weechat::register( "moc", "Jiri Golembiovsky", "0.5", "GPL", |
31 | 31 | "Show info about current song in moc", "", "" );
|
32 | 32 | weechat::hook_command(
|
33 | 33 | "moc",
|
34 | 34 | "Show info about current song in moc",
|
35 | 35 | "[i|o|ot]",
|
| 36 | + "To set another default output type than 'i' use: /set plugins.var.perl.moc.output_type\n" . |
36 | 37 | "i show info about current song (default parameter if no other is given)\n" .
|
37 | 38 | "o print results to the current channel as /msg\n" .
|
38 |
| - "ot print results to the current channel as /me, this parameter overide -o parameter\n" . |
39 |
| - "To set output format use moc_set_format command.\n" . |
40 |
| - "To set another default output type than -i use moc_set_output command.\n", |
| 39 | + "ot print results to the current channel as /me, this parameter overrides -o parameter\n" . |
| 40 | + "\n" . |
| 41 | + "To set output format use: /set plugins.var.perl.moc.output_format\n" . |
| 42 | + "%A - artist %B - album\n" . |
| 43 | + "%F - file/stream name %H - stream name\n" . |
| 44 | + "%J - total time %K - current time\n" . |
| 45 | + "%L - time left %M - total sec\n" . |
| 46 | + "%N - current sec %S - status\n" . |
| 47 | + "%T - title %U - song title\n" . |
| 48 | + "%Y - bitrate %Z - rate\n", |
41 | 49 | "i|o|ot",
|
42 | 50 | "moc", "" );
|
43 | 51 |
|
44 |
| -# values for output_format: any string (may contain following item) |
45 |
| -# %A - artist |
46 |
| -# %B - album |
47 |
| -# %F - file name or stream name |
48 |
| -# %H - stream name |
49 |
| -# %J - total time |
50 |
| -# %K - current time |
51 |
| -# %L - time left |
52 |
| -# %M - total sec |
53 |
| -# %N - current sec |
54 |
| -# %S - status |
55 |
| -# %T - title |
56 |
| -# %U - song title |
57 |
| -# %Y - bitrate |
58 |
| -# %Z - rate |
| 52 | + |
59 | 53 | if( weechat::config_get_plugin( "output_format" ) eq "" ) {
|
60 | 54 | weechat::config_set_plugin( "output_format", "is listening to %T ::: %H" );
|
61 | 55 | }
|
62 |
| -# values for output_type: |
63 |
| -# i - show info about current song (default) |
64 |
| -# o - print info to the current channel as /msg |
65 |
| -# ot - print info to the current channel as /me |
| 56 | + |
66 | 57 | if( weechat::config_get_plugin( "output_type" ) eq "" ) {
|
67 | 58 | weechat::config_set_plugin( "output_type", "i" );
|
68 | 59 | }
|
|
0 commit comments