Changeset 615

Show
Ignore:
Timestamp:
06/20/05 15:13:48 (4 years ago)
Author:
james
Message:

proper implementation of friendship plugin

Location:
trunk/plugins
Files:
1 added
2 modified

Legend:

Unmodified
Added
Removed
  • trunk/plugins/admin_general.tcl

    r540 r615  
    1818bMotion_plugin_add_management "queue" "^queue"            n       bMotion_plugin_management_queue "any" 
    1919bMotion_plugin_add_management "parse" "^parse"            n       bMotion_plugin_management_parse "any" 
    20 bMotion_plugin_add_management "friends" "^friends(hip)?"  n       bMotion_plugin_management_friends "any" 
    2120bMotion_plugin_add_management "rehash" "^rehash"          n       bMotion_plugin_management_rehash "any" 
    2221bMotion_plugin_add_management "reload" "^reload"          n       bMotion_plugin_management_reload "any" 
     
    9291        bMotionDoAction $target "somenick" $arg 
    9392        return 0 
    94 } 
    95  
    96 proc bMotion_plugin_management_friends { handle { arg "" } } { 
    97   if {$arg == ""} { 
    98     bMotion_putadmin "[getFriendsList]" 
    99     return 0 
    100   } 
    101  
    102   if [regexp -nocase {([^ ]+)( (.+))?} $arg matches nick pom val] { 
    103     if {$val == ""} { 
    104       bMotion_putadmin "friendship rating for $nick is [getFriendshipHandle $nick]\r" 
    105     } else { 
    106       setFriendshipHandle $nick $val 
    107       bMotion_putadmin "friendship rating for $nick is now [getFriendshipHandle $nick]\r" 
    108     } 
    109     return 0 
    110   } 
    11193} 
    11294 
  • trunk/plugins/admin_help.tcl

    r540 r615  
    114114                "friends" { 
    115115                        bMotion_putadmin "Lists bMotion's friendships" 
     116                        bMotion_putadmin "  .bmotion friends show <nick>" 
     117                        bMotion_putadmin "    Shows the rating for the user" 
     118                        bMotion_putadmin "  .bmotion friends show -all" 
     119                        bMotion_putadmin "    Shows A LOT OF OUTPUT!!1" 
     120                        bMotion_putadmin "  .bmotion friends set <nick> <value>" 
     121                        bMotion_putadmin "    Sets user's friendship rating" 
     122                        bMotion_putadmin "Friendships are rated 0-100% with 50% being neutral. All users start on 50%." 
     123                        bMotion_putadmin "Actions against the bot affect friendships; friendships drift back to 40 or 60% (depending" 
     124                        bMotion_putadmin "on if they are lower or higher than those limits)." 
    116125                } 
    117126                "settings" {