Some improvements to division.c messages
authorAri Johnson <ari@theari.com>
Fri, 29 Feb 2008 21:32:15 +0000 (21:32 +0000)
committerAri Johnson <ari@theari.com>
Thu, 24 Mar 2011 15:58:45 +0000 (15:58 +0000)
(cherry picked from commit ccc93614d01d831a3cdf50432089db496838359c)

src/division.c

index 6595a59a2a9f72d36672db66026144cbaffc541d..46e14910a364b5398c7c8d63a824827607a9f288 100644 (file)
@@ -561,7 +561,7 @@ powergroup_db_set(dbref executor, dbref player, const char *powergroup,
 
 
   if (!powergroup || !*powergroup) {
-    notify(executor, "Must provide powergroup arguments.");
+    notify(executor, "Must provide powergroup names.");
     return;
   }
 
@@ -587,7 +587,7 @@ powergroup_db_set(dbref executor, dbref player, const char *powergroup,
 
     if (GoodObject(executor) && !God(executor)
         && !can_have_pg(player, pgrp)) {
-      notify_format(executor, "%s can not receive the '%s' powergroup.",
+      notify_format(executor, "%s cannot receive the %s powergroup.",
                     unparse_object(executor, player), pgrp->name);
       continue;
     }
@@ -607,7 +607,7 @@ powergroup_db_set(dbref executor, dbref player, const char *powergroup,
                   check_power_yescode(DPBITS(executor), power))
               < check_power_yescode(pgrp->max_powers, power)) {
             notify_format(executor,
-                          "You must possess '%s' power to set the '%s' powergroup.",
+                          "You must have the %s power to add the %s powergroup.",
                           power->name, pgrp->name);
             goto pgset_recurse;
           }
@@ -616,21 +616,28 @@ powergroup_db_set(dbref executor, dbref player, const char *powergroup,
 
     if (reset) {
       if (!powergroup_has(player, pgrp)) {
-        /* TODO: Better message */
-        notify(executor,
-               "They don't have the powergroup in the first place.");
+        memset(tbuf, '\0', 128);
+        strncpy(tbuf, object_header(executor, player), 127);
+        notify_format(executor, "%s did not have powergroup %s.",
+           tbuf, pgrp->name);
         continue;
       }
       /* Remove */
       rem_pg_from_player(player, pgrp);
-      notify_format(executor, "You remove powergroup '%s' from %s.",
-                    pgrp->name, object_header(executor, player));
-      notify_format(player, "%s removed powergroup '%s' from you.",
-                    object_header(player, executor), pgrp->name);
+      memset(tbuf, '\0', 128);
+      strncpy(tbuf, object_header(executor, player), 127);
+      notify_format(executor, "You remove powergroup %s from %s.",
+                    pgrp->name, tbuf);
+      memset(tbuf, '\0', 128);
+      strncpy(tbuf, object_header(player, executor), 127);
+      notify_format(player, "%s removed powergroup %s from you.",
+         tbuf, pgrp->name);
     } else {
       if (powergroup_has(player, pgrp)) {
-        notify(executor,
-               "They already have that powergroup.  Don't add it twice.");
+        memset(tbuf, '\0', 128);
+        strncpy(tbuf, object_header(executor, player), 127);
+        notify_format(executor, "%s already has powergroup %s.",
+           tbuf, pgrp->name);
         continue;
       }
       /* Add */
@@ -661,12 +668,12 @@ powergroup_db_set(dbref executor, dbref player, const char *powergroup,
       if (executor != NOTHING) {
         memset(tbuf, '\0', 128);
         strncpy(tbuf, object_header(executor, player), 127);
-        notify_format(executor, "Added Powergroup '%s' to %s.", pgrp->name,
+        notify_format(executor, "You added powergroup %s to %s.", pgrp->name,
                       tbuf);
         memset(tbuf, '\0', 128);
         strncpy(tbuf, object_header(player, executor), 127);
-        notify_format(player, "You received Powergroup '%s' from %s.",
-                      pgrp->name, tbuf);
+        notify_format(player, "%s added powergroup %s to you.",
+                      tbuf, pgrp->name);
       }
     }
   pgset_recurse: