blob: 9a9d718f7ca3c45b8f69c29aa528dbb03a104571 [file] [log] [blame]
MG Mud User88f12472016-06-24 23:31:02 +02001// MorgenGrauen MUDlib
2//
3// channel.c -- channel client
4//
5// $Id: channel.c 9404 2015-12-13 00:21:44Z Zesstra $
6#pragma strong_types
7#pragma save_types
8#pragma range_check
9#pragma no_clone
10#pragma pedantic
11
12#define NEED_PROTOTYPES
13#include <util.h>
14#include <thing/properties.h>
15#include <living/comm.h>
16#include <player.h>
17#include <player/comm.h>
18#include <daemon.h>
19#include <player/gmcp.h>
20#undef NEED_PROTOTYPES
21
22#include <wizlevels.h>
23#include <defines.h>
24#include <properties.h>
25#include <sys_debug.h>
26#include <regexp.h>
27
28#define P_SWAP_CHANNELS "swap_channels"
29#define P_CHANNEL_SHORT "short_channels"
30
31#define CHANNELCMDS "[#@%$&()<>a-zA-Z0-9\\-]"
32
33#define DEFAULT_CHANNELS ({"Abenteuer", "Anfaenger","Grats","Tod", "ZT"})
34#define DEFAULT_SHORTCUTS \
35([ \
36 "b":"Abenteuer", \
37 "a":"Allgemein", \
38 "B":"Beileid", \
39 "q":"D-chat", \
40 "G":"Grats", \
41 "M":"Moerder", \
42 "h":"Seher", \
43 "T":"Tod", \
44])
45
46#define WIZARD_SHORTCUTS \
47([ \
48 "P":"D-code", \
49 "D":"Debug", \
50 "O":"Intercode", \
51 "I":"Intermud", \
52 "m":"Magier", \
53])
54
55
56private nosave mapping shortcut;
57private nosave int c_status;
58
59void create()
60{
61 Set(P_CHANNELS, SAVE, F_MODE);
62 Set(P_CHANNELS, DEFAULT_CHANNELS);
63 Set(P_SWAP_CHANNELS, SAVE, F_MODE);
64 Set(P_STD_CHANNEL, "Allgemein");
65 Set(P_STD_CHANNEL, SAVE, F_MODE);
66 Set(P_CHANNEL_SHORT, SAVE, F_MODE);
67 Set(P_CHANNEL_SHORT, DEFAULT_SHORTCUTS
68 + (IS_LEARNER(this_object()) ? WIZARD_SHORTCUTS : ([])));
69}
70
71static mixed _query_localcmds()
72{
73 return ({({"-","ChannelParser", 1, 0}),
74 ({"ebene", "ChannelAdmin", 0, 0}),
75 ({"ebenen", "ChannelAdmin", 1, 0}),
76 });
77}
78
79mixed RegisterChannels()
80{
81 mixed err;
82 if(extern_call() &&
83 previous_object() != find_object(CHMASTER)) return;
84 c_status = 0;
85 shortcut = QueryProp(P_CHANNEL_SHORT);
86 SetProp(P_CHANNELS, map(QueryProp(P_CHANNELS) || ({}),
Zesstra57a693e2019-01-06 22:08:24 +010087 #'lower_case));
MG Mud User88f12472016-06-24 23:31:02 +020088 err = filter(QueryProp(P_CHANNELS),
89 symbol_function("join", CHMASTER),
90 this_object());
91 if(QueryProp(P_LEVEL) < 5) return err;
92 while(sizeof(err)) {
93 CHMASTER->new(err[0], this_object());
94 err[0..0] = ({});
95 }
96 return err;
97}
98
99mixed RemoveChannels()
100{
101 closure cl;
102 mixed err=({});
103 if(extern_call() &&
104 previous_object() != find_object(CHMASTER)) return;
105 if(!c_status) c_status = 1;
106 else return ({});
107 cl=symbol_function("leave", CHMASTER);
108 if (closurep(cl)) {
109 err = filter(QueryProp(P_CHANNELS), cl, this_object());
110 SetProp(P_CHANNELS, QueryProp(P_CHANNELS) - err);
111 }
112 return err;
113}
114
115varargs private string getName(mixed x, int fall) {
116
117 mixed o = closurep(x) ? query_closure_object(x) : x;
118 if(stringp(o) && sizeof(o) && (x = find_object(o)))
119 o = x;
120
121 // Objekte
122 if (objectp(o)) {
123 // Magier sehen unsichtbare nicht nur als "Jemand"
124 if (o->QueryProp(P_INVIS) && IS_LEARNING(this_object()))
125 return "("+capitalize(getuid(o))+")";
126 // Froesche mit Namen versorgen.
127 if (o->QueryProp(P_FROG))
128 return "Frosch "+capitalize(getuid(o));
129 // Default (Unsichtbare als "Jemand" (s. Name()))
130 return o->Name(fall, 2)||"<Unbekannt>";
131 }
132 // Strings
133 else if (stringp(o) && sizeof(o)) {
134 if (o[0] == '/') {
135 // unsichtbare Objekte...
136 int p = strstr(o, "$");
137 if (p != -1) {
Zesstra57a693e2019-01-06 22:08:24 +0100138 // Magier im Magiermodus kriegen den Realnamen, andere nicht.
139 if (IS_LEARNING(this_object()))
140 return o[1..p-1];
141 else
142 return o[p+1..];
MG Mud User88f12472016-06-24 23:31:02 +0200143 }
144 else
Zesstra57a693e2019-01-06 22:08:24 +0100145 // doch nicht unsichtbar
146 return (fall == WESSEN ? o+"s" : o);
MG Mud User88f12472016-06-24 23:31:02 +0200147 }
148 else
149 // nicht unsichtbar
150 return (fall == WESSEN ? o+"s" : o);
151 }
152 // Fall-through
153 return "<Unbekannt>";
154}
155
156// <nonint> unterdrueckt die AUsgabe an den Spieler und liefert den Text
157// zurueck. Wird nur fuer die Ebenenhistory benutzt.
158string ChannelMessage(mixed* msg, int nonint)
159{
160 string channel_message;
161 string channel=msg[0];
162 object sender=msg[1];
163 string message=msg[2];
164 int msg_type = msg[3];
165
166 if ( previous_object() != find_object(CHMASTER) &&
167 previous_object() != ME )
168 return 0;
169
170 string sender_name = getName(sender, msg_type == MSG_GEMOTE ? WESSEN : WER);
171 int prepend_indent_flag=QueryProp(P_MESSAGE_PREPEND) ? BS_PREPEND_INDENT : 0;
172 switch(msg_type) {
173 case MSG_EMPTY:
174 channel_message= message+"\n";
175 break;
176 case MSG_GEMOTE:
177 case MSG_EMOTE:
178 channel_message = break_string(sender_name + " "+ message+"]",
179 78, sprintf("[%s:", channel),
180 BS_INDENT_ONCE|prepend_indent_flag);
181 break;
182 case MSG_SAY:
183 default:
184 string presay=sprintf("[%s:%s] ", channel, sender_name);
185 channel_message = break_string(message, max(78,sizeof(presay)+10),
186 presay, prepend_indent_flag);
187 break;
188 }
189 if(nonint)
190 return channel_message;
191
192 // Wenn GMCP sich um Uebertragung der Nachricht kuemmert, wird ReceiveMsg()
193 // nicht mehr aufgerufen.
194 if (GMCP_Channel(channel_message, channel, sender_name) != 1)
195 {
196 // Der Ebenenname muss in Kleinbuchstaben uebergeben werden, damit die
197 // Ignorierepruefung funktioniert. Die ignorierestrings sind naemlich alle
198 // kleingeschrieben.
199 ReceiveMsg(channel_message,
200 MT_COMM|MT_FAR|MSG_DONT_STORE|MSG_DONT_WRAP,
201 MA_CHANNEL"." + lower_case(channel), 0, sender);
202 }
203 return 0;
204}
205
206private void createList(string n, mixed a, mixed m, mixed l)
207{
208 int pos; string sh, *mem;
209 if((pos = member(map(m_values(shortcut), #'lower_case/*'*/), n)) != -1)
210 sh = m_indices(shortcut)[pos];
211 else sh = "";
212 mem=map(a[I_MEMBER],#'getName/*'*/, WER);
213 mem-=({"<MasteR>"});
214 l += ({ sprintf("%-12.12'.'s %c[%-1.1s] %|12.12' 's (%-|3' 'd) %-42.42s\n",
215 a[I_NAME], (member(m, n) != -1 ? '*' : ' '), sh,
216 a[I_MASTER] ?
217 getName(a[I_MASTER]) : getName(a[I_ACCESS]),
218 sizeof(mem),
219 (closurep(a[I_INFO]) && objectp(query_closure_object(a[I_INFO]))) ?
220 funcall(a[I_INFO]) || "- Keine Beschreibung -" :
221 (stringp(a[I_INFO]) ? a[I_INFO] : "- Keine Beschreibung -")
222 ) });
223}
224
225private mixed getChannel(string ch)
226{
227 mixed ff;
228 if(!sizeof(ch)) ch = QueryProp(P_STD_CHANNEL);
229 if(shortcut && shortcut[ch]) ch = shortcut[ch];
230 return CHMASTER->find(ch, this_object());
231}
232
233#ifndef DEBUG
234#define DEBUG(x) if (funcall(symbol_function('find_player),"zesstra"))\
235 tell_object(funcall(symbol_function('find_player),"zesstra"),\
Zesstra57a693e2019-01-06 22:08:24 +0100236 "MDBG: "+x+"\n")
MG Mud User88f12472016-06-24 23:31:02 +0200237#endif
238int ChannelParser(string args)
239{
240 mixed ch, cmd, tmp;
241 int pos, type, err;
242 string txt;
243 cmd = query_verb();
244 args = _unparsed_args();
245 notify_fail("Benutzung: -<Ebene>[ ]['|:|;]<Text>\n"
246 " -<Ebene>[+|-|?|!|*]\n"
247 " -?\n");
248 if(!cmd && !args) return 0;
249 if(!args) args = "";
250 cmd = cmd[1..];
251 if(sizeof(cmd = regexplode(cmd,
252 "^" CHANNELCMDS "*"
253 "([+-]|\\!|\\?|\\*)*")) > 1)
254 {
255 //z.B. cmd= ({"","allgemein",":testet"})
256 if(sizeof(cmd[1]) > 1 &&
257 strstr("+-?!*", cmd[1][<1..<1]) > -1)
258 tmp = cmd[1][0..<2];
259 else
260 tmp = cmd[1];
261 if(cmd[1] != "?" && cmd[1] != "!")
Zesstra57a693e2019-01-06 22:08:24 +0100262 {
263 ch = getChannel(tmp);
264 if(pointerp(ch))
MG Mud User88f12472016-06-24 23:31:02 +0200265 {
266 notify_fail("Diese Angabe war nicht eindeutig! "
267 "Folgende Ebenen passen:\n"
268 +implode(ch, ", ")+"\n");
269 return 0;
270 }
Zesstra57a693e2019-01-06 22:08:24 +0100271 else if(!ch)
272 return (notify_fail("Die Ebene '"+tmp
273 + "' gibt es nicht!\n"), 0);
274 }
MG Mud User88f12472016-06-24 23:31:02 +0200275 //DEBUG(sprintf("ChanCmd: %O\n",cmd));
276 if (sizeof(cmd[1])) {
277 switch(cmd[1][<1]) {
278 case '+':
279 switch(CHMASTER->join(ch, this_object()))
280 {
281 case E_ACCESS_DENIED:
282 notify_fail("Du darfst an die Ebene '"+ch+"' nicht heran.\n");
283 return 0;
284 case E_ALREADY_JOINED:
285 notify_fail("Du hast diese Ebene schon betreten!\n");
286 return 0;
287 default: break;
288 }
289 write("Du betrittst die Ebene '"+ch+"'.\n");
290 if(member(QueryProp(P_CHANNELS), ch = lower_case(ch)) == -1)
291 SetProp(P_CHANNELS, QueryProp(P_CHANNELS) + ({ ch }));
292 return 1;
293 case '-':
294 switch(CHMASTER->leave(ch, this_object()))
295 {
296 case E_ACCESS_DENIED:
297 write("Du kannst die Ebene '"+ch+"' nicht verlassen.\n");
298 break;
299 case E_NOT_MEMBER:
300 write("Wie willst Du eine Ebene verlassen, welche Du nicht "
301 "betreten hast?\n");
302 break;
303 default:
304 write("Du verlaesst die Ebene '"+ch+"'.\n");
305 SetProp(P_CHANNELS, QueryProp(P_CHANNELS) - ({ lower_case(ch), ch }));
306 break;
307 }
308 return 1;
309 case '!':
310 case '?':
311 {
312 mapping l;
313 if(mappingp(l = CHMASTER->list(this_object())))
Zesstra57a693e2019-01-06 22:08:24 +0100314 {
MG Mud User88f12472016-06-24 23:31:02 +0200315 if(stringp(ch) && sizeof(ch) && pointerp(l[ch = lower_case(ch)]))
316 {
317 int c; object o; string n; string *m;
318 m=sort_array(map(l[ch][I_MEMBER],#'getName/*'*/, WER),#'>/*'*/);
319 m-=({"<MasteR>"});
320 write(l[ch][I_NAME]+", "+funcall(l[ch][I_INFO])+".\n");
321 write("Du siehst "+((c = sizeof(m)) > 0
322 ? (c == 1 ? "ein Gesicht" : c+" Gesichter")
323 : "niemanden")+" auf der Ebene '"
324 +l[ch][I_NAME]+"':\n");
325 write(break_string(implode(m,", "), 78));
326 write((l[ch][I_MASTER] ?
327 getName(l[ch][I_MASTER]) : getName(l[ch][I_ACCESS], WER))
328 +" hat das Sagen auf dieser Ebene.\n");
329 }
330 else
331 {
332 mixed list; list = ({});
333 if(cmd[1][<1] == '!')
334 l -= mkmapping(m_indices(l) - QueryProp(P_CHANNELS));
335 walk_mapping(l, #'createList/*'*/, QueryProp(P_CHANNELS), &list);
336 list = sort_array(list, #'>/*'*/);
337 txt = sprintf("%-12.12' 's [A] %|12' 's (%-3' 's) %-42.42s\n",
338 "Name", "Eigner", "Sp", "Beschreibung")
339 + "-------------------------------------------------------"
340 + "-----------------------\n"
341 + implode(list, "");
342 More(txt);
343 }
Zesstra57a693e2019-01-06 22:08:24 +0100344 }
MG Mud User88f12472016-06-24 23:31:02 +0200345 return 1;
Zesstra57a693e2019-01-06 22:08:24 +0100346
MG Mud User88f12472016-06-24 23:31:02 +0200347 }
348 case '*':
349 {
350 mixed hist; int amount;
351 if(!pointerp(hist = CHMASTER->history(ch, this_object()))
Zesstra57a693e2019-01-06 22:08:24 +0100352 || !sizeof(hist))
MG Mud User88f12472016-06-24 23:31:02 +0200353 {
354 write("Es ist keine Geschichte fuer '"+ch+"' verfuegbar.\n");
355 return 1;
356 }
357
358 //(Zesstra) cmd hat offenbar immer 3 Elemente...
359 //bei -all* ({"","all*",""})
360 //bei -all*10 ({"","all*,"10"})
361 //also ist bei -all* amount immer == 0 und es funktioniert eher zufaellig.
362 /*if(sizeof(cmd) > 2)
363 amount = to_int(cmd[2]);
364 else
365 amount=sizeof(hist);*/
366 amount=to_int(cmd[2]);
367 if (amount <= 0 || amount >= sizeof(hist))
368 amount=sizeof(hist);
369
370 txt = "Folgendes ist auf '"+ch+"' passiert:\n"
371 + implode(map(hist[<amount..], #'ChannelMessage/*'*/, 1), "");
372 More(txt);
373 return 1;
374 }
375 default:
376 break;
377 }
378 }
379 }
380 if(sizeof(cmd = implode(cmd[2..], "")))
381 args = cmd + (sizeof(args) ? " " : "") + args;
382
383 // KOntrollchars ausfiltern.
384 args = regreplace(args,"[[:cntrl:]]","",RE_PCRE|RE_GLOBAL);
385 if(!sizeof(args)) return 0;
386
387 //Wenn cmd leer ist: MSG_SAY
388 if (!sizeof(cmd)) type=MSG_SAY;
389 else {
390 switch(cmd[0])
391 {
392 case ':' :
393 type = MSG_EMOTE;
394 args = args[1..];
395 break;
396 case ';' :
397 type = MSG_GEMOTE;
398 args = args[1..];
399 break;
400 case '\'':
401 args = args[1..];
402 default : type = MSG_SAY; break;
403 }
404 }
405 if(!ch || !sizeof(ch)) ch = QueryProp(P_STD_CHANNEL);
406 if((err = CHMASTER->send(ch, this_object(), args, type)) < 0)
407 if(!(err = CHMASTER->join(ch, this_object())))
408 {
409 if(member(QueryProp(P_CHANNELS), ch = lower_case(ch)) == -1)
410 SetProp(P_CHANNELS, QueryProp(P_CHANNELS) + ({ ch }));
411 err = CHMASTER->send(ch, this_object(), args, type);
412 }
413
414 switch(err)
415 {
416 case E_ACCESS_DENIED:
417 notify_fail("Auf der Ebene '"+ch+"' darfst Du nichts sagen.\n");
418 return 0;
419 case E_NOT_MEMBER:
420 notify_fail("Du hast die Ebene '"+ch+"' nicht betreten!\n");
421 return 0;
422 }
423 return 1;
424}
425
426int ChannelAdmin(string args)
427{
428 string n, descr, sh, cn;
429 mixed pa, tmp;
430 args = _unparsed_args();
431 notify_fail("Benutzung: ebene <Abkuerzung>=<Ebene>\n"
432 " ebene <Abkuerzung>=\n"
433 " ebene abkuerzungen [standard]\n"
434 " ebene standard <Ebene>\n"
435 " ebene an|ein|aus\n"
436 +(QueryProp(P_LEVEL) >= 5 ?
437 " ebene neu <Name> <Bezeichnung>\n"
438 " ebene beschreibung <Name> <Beschreibung>\n" : "")
439 +(IS_ARCH(this_object()) ?
440 " ebene kill <Name>\n"
Zesstra57a693e2019-01-06 22:08:24 +0100441 " ebene clear <Name>\n": ""));
MG Mud User88f12472016-06-24 23:31:02 +0200442 if(!args || !sizeof(args)) return 0;
443 if(sscanf(args, "kill %s", n) && IS_ARCH(this_object()))
444 {
445 if(!(cn = CHMASTER->find(n, this_object()))) cn = n;
446 switch(CHMASTER->remove(cn, this_object()))
447 {
448 case E_ACCESS_DENIED:
449 notify_fail("Die Ebene '"+cn+"' lies sich nicht entfernen!\n");
450 return 0;
451 }
452 write("Du entfernst die Ebene '"+cn+"'.\n");
453 return 1;
454 }
455 if(sscanf(args, "clear %s", n) && IS_ARCH(this_object()))
456 {
457 if(!(cn = CHMASTER->find(n, this_object()))) cn = n;
458 switch(CHMASTER->clear_history(cn, this_object()))
459 {
460 case E_ACCESS_DENIED:
461 notify_fail("Der Verlauf zur Ebene '"+cn+"' lies sich nicht entfernen!\n");
462 return 0;
463 }
464 write("Du entfernst den Verlauf zur Ebene '"+cn+"'.\n");
465 return 1;
466 }
467 if(sscanf(args, "neu %s %s", n, descr) == 2)
468 {
469 mixed x;
470 if(QueryProp(P_LEVEL) < 5)
471 return (notify_fail("Neue Ebenen zu erstellen ist dir verwehrt.\n"), 0);
472 if(!sizeof(regexp(({ n }), "^" CHANNELCMDS CHANNELCMDS "*")))
473 return (notify_fail("Der Name '"+n+"' ist nicht konform!\n"), 0);
474 if (sizeof(n) > 20 )
475 return(notify_fail("Der Name '"+n+"' ist zu lang.\n"), 0);
476 switch(x = CHMASTER->new(n, this_object(), descr))
477 {
478 case E_ACCESS_DENIED:
479 notify_fail("Diese Ebene darfst du nicht erschaffen!\n"); break;
480 default:
481 write("Du erschaffst die Ebene '"+n+"'.\n");
482 SetProp(P_CHANNELS, QueryProp(P_CHANNELS) + ({ lower_case(n) }));
483 return 1;
484 }
485 }
486 if(sscanf(args, "beschreibung %s %s", n, descr) == 2)
487 {
488 mixed ch;
489 cn = CHMASTER->find(n, this_object());
490 if(!cn || pointerp(cn))
491 return (notify_fail("Die Ebene '"+n+"' existiert nicht oder die Angabe "
492 "war nicht eindeutig.\n"), 0);
493 ch = CHMASTER->list(this_object());
494 if(ch[lower_case(cn)][I_MASTER] != this_object())
495 return (notify_fail("Du bist nicht berechtigt die Beschreibung der Ebene"
496 " '"+cn+"' zu aendern.\n"), 0);
497 ch[lower_case(cn)][I_INFO] = descr;
498 write("Die Ebene '"+cn+"' hat ab sofort die Beschreibung:\n"+descr+"\n");
499 return 1;
500 }
501 if(sscanf(args, "%s=%s", sh, n) == 2 && sizeof(n))
502 {
503 mapping sc;
504 if(pointerp(tmp = CHMASTER->find(n, this_object())) || !tmp)
505 return (notify_fail("Benutzung: ebene <Abkuerzung>=<Ebene>\n"
506 +(pointerp(tmp) ? implode(tmp, ", ") + "\n" :
507 "Ebene '"+n+"' nicht gefunden!\n")), 0);
508 sc = QueryProp(P_CHANNEL_SHORT);
509 if(!sc) sc = ([]);
510 sc[sh] = tmp;
511 SetProp(P_CHANNEL_SHORT, sc);
512 shortcut = QueryProp(P_CHANNEL_SHORT);
513 write("'"+sh+"' wird jetzt als Abkuerzung fuer '"+tmp+"' anerkannt.\n");
514 return 1;
515 }
516 if(sscanf(args, "%s=", sh))
517 {
518 SetProp(P_CHANNEL_SHORT, m_copy_delete(QueryProp(P_CHANNEL_SHORT) || ([]), sh));
519 shortcut = QueryProp(P_CHANNEL_SHORT);
520 write("Du loeschst die Abkuerzung '"+sh+"'.\n");
521 return 1;
522 }
523 if(args == "an" || args == "ein")
524 {
525 mixed excl;
526 if(pointerp(QueryProp(P_SWAP_CHANNELS)))
527 SetProp(P_CHANNELS, QueryProp(P_SWAP_CHANNELS));
528 else
529 SetProp(P_CHANNELS, m_indices(CHMASTER->list(this_object())));
530 excl = RegisterChannels();
531 write("Du schaltest folgende Ebenen ein:\n"
532 +break_string(implode(QueryProp(P_CHANNELS) - excl, ", "), 78));
533 SetProp(P_SWAP_CHANNELS, 0);
534 return 1;
535 }
536 if(args == "aus")
537 {
538 SetProp(P_SWAP_CHANNELS, QueryProp(P_CHANNELS));
539 RemoveChannels();
540 SetProp(P_CHANNELS, ({}));
541 write("Du stellst die Ebenen ab.\n");
542 return 1;
543 }
544 pa = old_explode(args, " ");
545 if(!strstr("abkuerzungen", pa[0]))
546 {
547 string txt; txt = "";
548 if(sizeof(pa) > 1 && !strstr("standard", pa[1]))
549 {
550 write("Die Standard Abkuerzungen werden gesetzt.\n");
551 SetProp(P_CHANNEL_SHORT, DEFAULT_SHORTCUTS
552 + (IS_LEARNER(this_object()) ? WIZARD_SHORTCUTS : ([])));
553 }
Arathorndc28afc2018-11-26 22:20:59 +0100554 foreach(string abk, string ch_name : QueryProp(P_CHANNEL_SHORT)) {
555 txt += sprintf("%5.5s = %s\n", abk, ch_name);
556 }
MG Mud User88f12472016-06-24 23:31:02 +0200557 txt = sprintf("Folgende Abkuerzungen sind definiert:\n%-78#s\n",
558 implode(sort_array(old_explode(txt, "\n"), #'>/*'*/), "\n"));
559 More(txt);
560 return 1;
561 }
562 if(!strstr("standard", pa[0]))
563 if(sizeof(pa) < 2)
564 return (notify_fail("Benutzung: ebene standard <Ebene>\n"
565 +(QueryProp(P_STD_CHANNEL)
566 ? "Momentan ist '"+QueryProp(P_STD_CHANNEL)
567 +"' eingestellt.\n"
568 : "Es ist keine Standardebene eingestellt.\n")),0);
569 else
570 if(pointerp(tmp = CHMASTER->find(pa[1], this_object())))
571 return (notify_fail("Das war keine eindeutige Angabe! "
572 "Folgende Ebenen passen:\n"
573 +break_string(implode(tmp, ", "), 78)), 0);
574 else
575 if(!tmp) return (notify_fail("Ebene '"+pa[1]+"' nicht gefunden!\n"),0);
576 else
577 {
578 write("'"+tmp+"' ist jetzt die Standardebene.\n");
579 SetProp(P_STD_CHANNEL, tmp);
580 return 1;
581 }
582 return(0);
583}
584