source: trunk/plugins/admin_friendship.tcl @ 1143

Revision 1142, 1.1 KB checked in by james, 7 days ago (diff)

improve output of friendship list
make -all command work for friendship show (match help)
update copyright date in startup message

  • Property svn:eol-style set to native
  • Property svn:executable set to *
  • Property svn:keywords set to Author Date Id Revision
Line 
1# bMotion: admin plugin file for friendship mangement
2#
3# $Id$
4#
5
6###############################################################################
7# This is a bMotion plugin
8# Copyright (C) James Michael Seward 2000-2002
9#
10# This program is covered by the GPL, please refer the to LICENCE file in the
11# distribution; further information can be found in the headers of the scripts
12# in the modules directory.
13###############################################################################
14
15
16### management version
17
18
19proc bMotion_plugin_management_friends { handle { arg "" } } {
20
21        if [regexp -nocase {show (.+)} $arg matches nick] {
22                if {$nick == "-all"} {
23                        bMotion_putadmin [getFriendsList]
24                        return 0
25                }
26                bMotion_putadmin "Friendship rating for $nick is [getFriendshipHandle $nick]%"
27                return 0
28        }
29
30        if [regexp -nocase {set ([^ ]+) ([0-9]+)} $arg matches nick val] {
31                setFriendshipHandle $nick $val
32                bMotion_putadmin "Friendship rating for $nick is now [getFriendshipHandle $nick]%"
33                return 0
34        }
35
36        bMotion_putadmin "usage: friendship \[show|set\]"
37}
38
39bMotion_plugin_add_management "friends" "^friends?(hip)?"  n       bMotion_plugin_management_friends "any"
Note: See TracBrowser for help on using the repository browser.