PennMUSH Community

Ticket #7570: chat-title-no-rhs.patch.txt

File chat-title-no-rhs.patch.txt, 2.9 kB (added by Talvo, 9 months ago)
Line 
1 *** src/extchat.c.orig  Fri Oct  5 23:36:32 2007
2 --- src/extchat.c   Wed Mar  5 04:00:50 2008
3 ***************
4 *** 102,107 ****
5 --- 102,109 ----
6  
7   CHAN *channels;    /**< Pointer to channel list */
8  
9 + extern int rhs_present; /* from command.c */
10 +
11   static PRIV priv_table[] = {
12     {"Disabled", 'D', CHANNEL_DISABLED, CHANNEL_DISABLED},
13     {"Admin", 'A', CHANNEL_ADMIN | CHANNEL_PLAYER, CHANNEL_ADMIN},
14 ***************
15 *** 2028,2033 ****
16 --- 2030,2051 ----
17       notify(player, T("You must specify a channel."));
18       return;
19     }
20 +   
21 +   test_channel(player, name, c);
22 +   u = onchannel(player, c);
23 +   if (!u) {
24 +     notify_format(player, T("You are not on channel <%s>."), ChanName(c));
25 +     return;
26 +   }
27 +   
28 +   if (!rhs_present) {
29 +     if (strlen(CUtitle(u)) == 0)
30 +       notify_format(player, T("You have no title set on <%s>."), ChanName(c));
31 +     else
32 +       notify_format(player, T("Your title on <%s> is '%s'."), ChanName(c), CUtitle(u));
33 +     return;
34 +   }
35 +   
36     if (!title)
37       title = (const char *) "";
38  
39 ***************
40 *** 2043,2054 ****
41         return;
42       }
43     }
44 !   test_channel(player, name, c);
45 !   u = onchannel(player, c);
46 !   if (!u) {
47 !     notify_format(player, T("You are not on channel <%s>."), ChanName(c));
48 !     return;
49 !   }
50     strcpy(CUtitle(u), title);
51     if (!Quiet(player))
52       notify_format(player, T("Title %s for %schannel <%s>."),
53 --- 2061,2067 ----
54         return;
55       }
56     }
57 !
58     strcpy(CUtitle(u), title);
59     if (!Quiet(player))
60       notify_format(player, T("Title %s for %schannel <%s>."),
61 *** game/txt/hlp/pennchat.hlp.orig  Mon Jul  9 04:50:12 2007
62 --- game/txt/hlp/pennchat.hlp   Wed Mar  5 04:06:08 2008
63 ***************
64 *** 154,160 ****
65   & @channel2
66     @channel/who <channel>
67     @channel/hide <channel> = <yes|no>
68 !   @channel/title <channel> = <string>
69  
70     The @channel/who command shows you who is currently on a channel,
71     if you are permitted to see it.
72 --- 154,160 ----
73   & @channel2
74     @channel/who <channel>
75     @channel/hide <channel> = <yes|no>
76 !   @channel/title <channel>[=<string>]
77  
78     The @channel/who command shows you who is currently on a channel,
79     if you are permitted to see it.
80 ***************
81 *** 165,173 ****
82     @channel/hide <channel>=no to reappear.
83  
84     @channel/title lets you set a title to appear before your name
85 !   when you speak on the channel. If you leave the channel, your
86 !   title is cleared; use @channel/gag instead (see help @channel3).
87 !   You should escape any commas in your title with backslashes.
88  
89     See "help @channel3" for more.
90   & @channel3
91 --- 165,174 ----
92     @channel/hide <channel>=no to reappear.
93  
94     @channel/title lets you set a title to appear before your name
95 !   when you speak on the channel, or check your current title. If
96 !   you leave the channel, your title is cleared; use @channel/gag
97 !   instead (see help @channel3). You should escape any commas in
98 !   your title with backslashes.
99  
100     See "help @channel3" for more.
101   & @channel3