X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=src%2FDynaConfig.pl;h=6f4de07d630bd587eecf5c5db428b5679028d094;hb=3536c5564f248374a76fa5eda24f4b9c5b2c54c1;hp=e52a2ead8b420a53d189844f0cc012e627f68deb;hpb=dd3a610c735093c82495a37a26a6353fd776dc43;p=infobot.git diff --git a/src/DynaConfig.pl b/src/DynaConfig.pl index e52a2ea..6f4de07 100644 --- a/src/DynaConfig.pl +++ b/src/DynaConfig.pl @@ -23,7 +23,8 @@ my @regFlagsUser = ( 'O', # dynamic ops (as on channel). (automatic +o) 'T', # add topics. 'a', # ask/request factoid. - 'm', # modify factoid. (includes renaming) + 'm', # modify all factoids. (includes renaming) + 'M', # modify own factoids. (includes renaming) 'n', # bot owner, can 'reload' 'o', # master of bot (automatic +amrt) # can search on factoid strings shorter than 2 chars @@ -40,6 +41,9 @@ my @regFlagsUser = ( sub readUserFile { my $f = "$bot_state_dir/infobot.users"; + if (! -e $f and -e "$bot_state_dir/blootbot.users") { + $f = "$bot_state_dir/blootbot.users"; + } if ( !-f $f ) { &DEBUG('userfile not found; new fresh run detected.'); @@ -273,6 +277,9 @@ sub writeUserFile { sub readChanFile { my $f = "$bot_state_dir/infobot.chan"; + if (-e "$bot_state_dir/infobot.chan" and -e "$bot_state_dir/blootbot.chan") { + $f = "$bot_state_dir/blootbot.chan"; + } if ( -f $f and -f "$f~" ) { my $s1 = -s $f; my $s2 = -s "$f~"; @@ -757,7 +764,7 @@ sub getUser { sub chanSet { my ( $cmd, $chan, $what, $val ) = @_; - if ( $cmd eq '+chan' ) { + if ( $cmd eq 'chanadd' ) { if ( exists $chanconf{$chan} ) { &performStrictReply("chan $chan already exists."); return;