1
namespace eval ::camserv {
2
variable plugin_name "Webcam Server"
12
::plugins::RegisterPlugin $plugin_name
13
::plugins::RegisterEvent $plugin_name chat_msg_receive msgReceive
16
contacts {my_allowed_contact@hotmail.com}
17
magicword {sendcamtome}
21
set configlist [list \
22
[list str "Magic word" magicword] \
23
[list str "Contacts" contacts] \
27
proc msgReceive {event evpar} {
34
#TODO: first check should be if it is part of the string
35
if { $config(contacts) == $email && $email != [::config::getKey login]} {
36
#TODO: check if it's the first word of the msg instead of is the msg
37
if { $msg == $config(magicword)} {
38
::MSNCAM::SendInviteQueue $email
41
#TODO: a change magicword command (syntax: "change oldword newword" ?
42
# if {[string first "magicword" $msg] == 0 )} {
43
# set msg [string range $msg 10 end]