This repository has been archived by the owner on Feb 5, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
options.conf
187 lines (139 loc) · 6.66 KB
/
options.conf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
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
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
[comment]
This is an example file to show you how to use it.
Most settings here are in CamelCase and this is required! (for now)
This block won't get parsed.
# is a comment
s_ is a string
i_ is a int
l_ is some list
b_ is a boolean ( 1=true 0=false )
Things in * are examples (like *lobby name 1* or *ip*)
[general]
i_version = 1
[retroshare]
# set up the connection to the rs-nogui
s_address = *ip*
i_port = *port*
s_user = *user*
s_password = *password*
s_chatNickname = *name used for chat lobbies*
# set up lobby settings
# should the bot join any lobby automatically? 0 = no; 1 = yes
b_autoJoin = 0
# what lobby should be joined? enter (exact) lobby names
# to separate two entries use ';'
#l_autoJoinLobbies = *lobby name 1*; *lobby name 2*; ...
# lobbies that should be created when not available
# *lobby name*;*lobby topic*;...
b_autoCreate = 0
#l_autoCreateLobbies = *lobby name 1*; *lobby topic 1*; *lobby name 2*; *lobby topic 2*; ....
# join all lobbies? (needs autoJoin )
# leave lobby on special keyword (like !kill)
b_joinAllLobbies = 0
b_leaveOnMsg = 0
b_useBlacklist = 1
# on what message should the bot leave?
s_leaveMsg = /kill
# leave lobbies on shut down?
b_leaveLobbies = 0
[comment]
Now to IRC:
- you need to define servers (and give them a name)
- you need to define channels and match them to a server (to the name you gave them)
s_server = *name (for adding channels)*; *address*; *port*; *use SSL*; *userName*; *password*; *nickName*; *realName*
s_channel = *server name*; *irc channel name*; *irc channel key (optional)*; *RetroShare lobby name for the bridge*
SSL is not supported right now!
[irc]
# example:
#s_server = freenode; irc.freenode.net; 6667; 0; Bridge;; Bridge; Bridge-realNick
# add channels
#s_channel = freenode; #retroshare;; RetroShare on IRC
#s_channel = freenode; #libre-mesh;; libre-mesh
#s_channel = freenode; #eigenlab;; eigenlab
[comment]
The bot is able to listen to command in a special private lobby. Keep in mind that everybody who has access to the lobby can control the bot since the lobbies are anonymous.
And don't forget that the bot must be able to see/access the lobby!
Commands are:
/options lists all current options
/lobbies lists all visible lobbies
/blacklist lists current lobby black list
/commands lists all available commands
/clearblacklist clears lobby blacklist
/join *lobby name*
/leave *lobby name*
use %all% for all lobbies - obviously the bot won't leave the control lobby
/say *lobby name*; *text*
sends a message to a lobby (use %all% for all lobbies)
/autojoin 1/0
/autojoinall 1/0
/leavelobbies 1/0 (at shut down)
/autocreate 1/0
/leaveonmsg 1/0
/useblacklist 1/0
/autoreponse 1/0
/restart restarts the bot - useful to load new options
/reload same as /restart
/off turn bot off - useful to shut down the daemon
Hint:
You can change the '/' to what ever you want
[control]
b_enable = 1
s_lobbyName = Bot Control Room
s_leadingChar = !
[comment]
Now it's getting tricky! Each rule can be used by every interface. Basic format:
*name of rule* = *options*
*option* = *used by*; *allow context*; *separated*; *has leading character*; *leading character*; *search for*; *answer*
Name:
name for the rule - has no functionality.
Options:
separator ';'
*used by* = flag
enter as decimal - hope you know how to convert hex to dec :P
you can combine them too: IRC + RS = 0x03
0x00 all
0x01 Retroshare
0x02 IRC
*allow context* = boolean
"/help" <-- no context
"use /help" <-- context
*separated* = boolean
"bla/commandbla" <-- not separated
"bla /command bla" <-- separated
*has leading character* = boolean
"/command" <-- leading character is '/'
"command" <-- no leading character
*leading character* = char
optional - only needed when *has leading character* is used
*search for* = string
the keyword(s) the auto response should search for e.g. "help"
can be combined with a leading character like "/help"
*answer* = string
the answer that should be displayed (supporting replacement see below)
Replacements:
%nick% will be replaced with the sender's nickname
%ownnick% will be replaced with the bot's name
Hint:
HTML-Tags are allowed (e.g. <br> for e new line)
<b> seems to not work
obviously HTML won't work in IRC
[autoresponse]
b_enable = 1
[autoresponse-rule]
# you may knows these from RS ;)
ping = 0;0;1;0;; ping; @%nick%: pong
pong = 3;0;1;0;; pong; @%nick%: pong
#self-aware = 0;1;0;0;; %ownnick%; Heh...
help = 0;0;1;1;/; help; use !help instead :P
help = 0;0;1;1;!; help; Known commands:<br>!help - you just used this one<br>!info - shows info about the bot<br>!links - show usefull RS links<br>!manual - shows RS links for EN and DE manual<br>!features - lists features
links = 0;0;1;1;!; links; Please visit http://retroshare.sourceforge.net/ , http://redd.it/18vsq5 - unofficial user wiki: http://retroshare.wikidot.com - DevBlog: http://retroshareteam.wordpress.com - public chatservers http://retrosharechatserver.no-ip.org/w2c/en/ & http://retrochat.piratenpartei.at
manualDE = 1;0;1;1;!; manual; German: <a href="retroshare://file?name=RetroShare_Manual_German_2012_12_12.pdf&size=221437&hash=271cc46798434ffbc6163daae86cce475621c952">RetroShare_Manual_German_2012_12_12.pdf</a>
manualEN = 1;0;1;1;!; manual; English: <a href="retroshare://file?name=RetroShare_Manual_English_2012_12_12_UNFINISHED.pdf&size=183421&hash=b7196b802271946e979279f56e4dea4c1cdac9d0">RetroShare_Manual_English_2012_12_12_UNFINISHED.pdf</a>
manualNetwork = 1;0;1;1;!; manual; network configuration: http://sleeplessbyte.com/blog/2013/07/31/retroshare-network-configurations/
manualReddit = 1;0;1;1;!; manual; RetroShare Feature List: http://www.reddit.com/r/retroshare/comments/18vsq5/retroshare_feature_list/
features = 0;0;1;1;!; features; %ownnick% by sehraf - features:<br> - written in C++ to run as a daemon<br> - automatically join specific lobbies / all lobbies available<br> - automatically create lobbies if they are not available<br> - automatic response system<br> - bridge to IRC (multiple channels and servers (TODO server)<br> - control lobby - control your bot through a (suggested private) chat lobby<br>
info = 0;0;1;1;!; info; %ownnick% - RetroShare nogui running RetroShareChatBot by sehraf.<br>Try !help for a list of commands.
me = 1;1;1;1;/; me; /me is not supported by RetroShare :<
test = 0;0;1;0;; test; @%nick%: test back :P
key = 1;0;1;1;!; key; chatwindow > right mouse > paste cert link
rspgp = 0;0;1;1;!; rspgp; gpg --no-default-keyring --keyring ~/.retroshare/pgp/retroshare_public_keyring.gpg --secret-keyring ~/.retroshare/pgp/retroshare_secret_keyring.gpg --openpgp **add command here**