blob: 1d118698d18f0ed16849eb40ba8081b40bd973bd [file] [log] [blame]
MG Mud User88f12472016-06-24 23:31:02 +02001/* a finger
2 * Original (c) 14.03.1993 by Taube @Nightfall
3 * Umsetzung fuer Morgengrauen 09.08.1993 by Loco
4
5 Verwendung ausserhalb von Morgengrauen ist gestattet unter folgenden
6 Bedingungen:
7 - Benutzung erfolgt auf eigene Gefahr. Jegliche Verantwortung wird
8 abgelehnt.
9 - Auch in veraenderten oder abgeleiteten Objekten muss ein Hinweis auf
10 die Herkunft erhalten bleiben.
11 Ein Update-Service besteht nicht.
12
13 * 29.Okt 1993 Seherversion.
14 * spaeter auch fuer externen Aufruf verwendbar gemacht
15 * 13.Okt .plan und .project koennen auch in ~loco/plans sein.
16 * 15.Jan 1994 angepasst an neues Speicherformat
17 * 02-05.Dez94 -n, -p
18 *
19 * Gelegentlich minor changes, zuletzt 04.Okt.95
Rumataebf937b2025-06-28 16:18:10 +020020 *
21 * 2025-06-28 rumata
22 * Daten einzeln per QueryProp auslesen (da QueryProperties im
23 * playerobjekt nicht mehr geboten).
MG Mud User88f12472016-06-24 23:31:02 +020024 */
25
26#pragma strong_types,save_types
27#pragma no_clone, no_shadow
28
29#include <config.h>
30#include <properties.h>
31#include <wizlevels.h>
32#include <new_skills.h>
33#include <userinfo.h>
34#include <config.h>
35
36#define HBINT 2 /* interval between two heart_beats in seconds */
37#define MINIDLE 60 /* minimum idle time in seconds to be stated idle */
38#define TBANISH_EXTRACT 71.. /* Der benoetigte Teil des TBanish-strings */
39
40#define TP this_player()
41#define wiz (local && IS_LEARNER(TP))
42#define seer (local && IS_SEER(TP))
Rumataebf937b2025-06-28 16:18:10 +020043#define IN ((pdata->QueryProp(P_GENDER)==2)?"in":"")
MG Mud User88f12472016-06-24 23:31:02 +020044
45
46#define FLAG_NOPLAN 1
47#define FLAG_LONG 2
48#define FLAG_SPONSOR 4
49#define FLAG_VIS_LOGOUT 8
50#define FLAG_AVATAR 16
51
52
53mapping properties;
54int age,invis,hc_play;
55int filetime;
56mapping relatives;
57
58
59void create()
60{
61 seteuid(getuid());
62 filetime=0;
63}
64
Rumataebf937b2025-06-28 16:18:10 +020065mixed QueryProp( mixed key ) {
66 return properties[key];
67}
MG Mud User88f12472016-06-24 23:31:02 +020068
69string timediff(int time)
70{
71 string ret;
72
73 ret="";
74 if ( time >= 86400*365 ) {
75 ret+=time/(86400*365)+"a ";
76 time%=(86400*365);
77 }
78 if(time>=86400) {
79 ret+=time/86400+"d ";
80 time%=86400;
81 }
82 if(time<36000) ret+="0";
83 ret+=time/3600+":";
84 time%=3600;
85 if(time<600) ret+="0";
86 ret+=time/60+":";
87 time%=60;
88 if(time<10) ret+="0";
89 ret+=time+"";
90 return ret;
91}
92
93string sponsoring(string name)
94{
MG Mud User88f12472016-06-24 23:31:02 +020095 string *s,s2,s3,s4;
96 // Daten einlesen, wenn die daten aelter als 1 Tag sind oder sich
Zesstra0db0e6c2020-04-22 00:00:50 +020097 // /data/etc/SPONSOR geaendert hat.
MG Mud User88f12472016-06-24 23:31:02 +020098 if ((time() > filetime+86400) ||
Zesstra0db0e6c2020-04-22 00:00:50 +020099 filetime!=file_time("/data/etc/SPONSOR"))
MG Mud User88f12472016-06-24 23:31:02 +0200100 {
101 relatives=m_allocate(0,2);
Zesstra0db0e6c2020-04-22 00:00:50 +0200102 filetime=file_time("/data/etc/SPONSOR");
103 s=explode(read_file("/data/etc/SPONSOR"),"\n");
MG Mud User88f12472016-06-24 23:31:02 +0200104 foreach(string str: s) {
105 sscanf(str,"%s: %s macht %s zum Learner.",s2,s3,s4);
106 if (IS_LEARNER(lower_case(s3)) && IS_LEARNER(lower_case(s4)))
107 {
108 relatives[lower_case(s4),0]=s3;
109 s3=lower_case(s3);
110 s4+=" ("+query_wiz_level(lower_case(s4))+")";
111 if (!relatives[s3,1]) relatives[s3,1]=({s4});
112 else relatives[s3,1]+=({s4});
113 }
114 }
115 }
116 s2="";
117 if (relatives[name,0])
118 s2+="Vorfahre: "+relatives[name,0]+"\n";
119 if (relatives[name,1])
120 s2+="Nachfahre(n): "+break_string(implode(relatives[name,1],", "),78,14)[14..];
121 return s2;
122}
123
124varargs string finger_single(string str,int local)
125{
MG Mud User88f12472016-06-24 23:31:02 +0200126 string ip,text,ipnum,filename,away;
Zesstrae9c7b6f2021-05-07 09:33:25 +0200127 int wizlevel,idle,flags,last;
MG Mud User88f12472016-06-24 23:31:02 +0200128 mixed h,data,tmp;
129 object player,ob;
Rumataebf937b2025-06-28 16:18:10 +0200130 object pdata;
MG Mud User88f12472016-06-24 23:31:02 +0200131
132 /*DEBUG### tell_object((find_player("loco")||this_object()),"Finger request: '"+str+"'("+local+")\n");/**/
133 str=lower_case(str);
134 text="";
135 away="";
136 hc_play=0;
137
138 h=explode(str," ");
139 if (sizeof(h)==1) h=explode(str,"+");
140 if (member(h,"-n")>=0) flags=FLAG_NOPLAN;
141 if (member(h,"-p")>=0) flags=0;
142 if (member(h,"-l")>=0) flags|=FLAG_LONG;
143 if (member(h,"-s")>=0) flags|=FLAG_SPONSOR;
144 if (member(h,"-v")>=0) flags|=FLAG_VIS_LOGOUT;
145 if (member(h,"-a")>=0) flags|=FLAG_AVATAR;
146
147 h=(h-({"-n","-p","-l","-s", "-v","-a"}));
148 if (!sizeof(h)) {
149 text="Du solltest schon sagen, wer Dich interessiert!\n";
150 if (local) return write(text),0;
151 else return text;
152 }
153 str=h[0];
154 if (!sizeof(str) || str[0]<'a' || str[0]>'z') {
155 text="Also, so ("+str+") heisst bestimmt kein Spieler hier!\n";
156 if (local) return write(text),0;
157 else return text;
158 }
159
160 /* does this player exist? */
161 str=old_explode(str,".")[0];
MG Mud User88f12472016-06-24 23:31:02 +0200162 player=find_player(str)||find_netdead(str);
163
Zesstracd25d262020-01-21 19:36:39 +0100164 if( (!master()->find_userinfo(str) && !player) )
165 {
MG Mud User88f12472016-06-24 23:31:02 +0200166 text="Hmm... diesen Namen gibt es im "MUDNAME" nicht.\n";
167 if (tmp="/secure/master"->QueryBanished(str)){
168 text="Hoppla - dieser Name ist reserviert oder gesperrt (\"gebanisht\")!\n";
169 if ( tmp != "Dieser Name ist gesperrt." )
170 text += "Grund fuer die Sperrung: " + tmp +
171 (member( ({'!','?','.'}), tmp[<1] ) != -1 ? "" : ".") + "\n";
172 }
173 if (local) return write(text),0;
174 else return text;
175 }
176
177 if (player) {
178 hc_play=player->query_hc_play();
Rumataebf937b2025-06-28 16:18:10 +0200179 pdata = player;
MG Mud User88f12472016-06-24 23:31:02 +0200180 tmp = player->QueryProp(P_PRESAY);
Rumataebf937b2025-06-28 16:18:10 +0200181 //properties[P_PRESAY]=(stringp(tmp) && sizeof(tmp)>1) ? tmp[0..<2] : 0;
MG Mud User88f12472016-06-24 23:31:02 +0200182 }
Rumataebf937b2025-06-28 16:18:10 +0200183 else {
Bugfix860e85a2020-12-11 12:35:28 +0100184 restore_object(SAVEPATH+str[0..0]+"/"+str);
Rumataebf937b2025-06-28 16:18:10 +0200185 if (!properties) {
186 text+="Mist!!! Das Einlesen der Daten klappt nicht wie es soll :-(\n";
187 if (!local)
188 return text;
189 write(text);
190 return "";
191 }
192 pdata = this_object();
MG Mud User88f12472016-06-24 23:31:02 +0200193 }
Rumataebf937b2025-06-28 16:18:10 +0200194
MG Mud User88f12472016-06-24 23:31:02 +0200195 if ( player && interactive(player) )
196 ipnum = query_ip_number(player);
197 else
Rumataebf937b2025-06-28 16:18:10 +0200198 ipnum = pdata->QueryProp(P_CALLED_FROM_IP);
MG Mud User88f12472016-06-24 23:31:02 +0200199 // frueher stand in P_CALLED_FROM_IP evtl. auch der Name direkt drin
200 // anstelle der numerischen IP
Rumataebf937b2025-06-28 16:18:10 +0200201 ip=query_ip_name(ipnum)||pdata->QueryProp(P_CALLED_FROM_IP);
MG Mud User88f12472016-06-24 23:31:02 +0200202 if(player) {
203 if (!interactive(player) || (idle=query_idle(player))<MINIDLE)
204 idle=0;
205 if (!(invis=age=player->QueryProp(P_INVIS)))
206 age=player->QueryProp(P_AGE);
207 } else {
Rumataebf937b2025-06-28 16:18:10 +0200208 if (pdata->QueryProp(P_INVIS)) age=pdata->QueryProp(P_INVIS);
209 idle=pdata->QueryProp(P_LAST_LOGOUT);
MG Mud User88f12472016-06-24 23:31:02 +0200210 }
211
212 wizlevel=query_wiz_level(str);
Bugfix860e85a2020-12-11 12:35:28 +0100213 if ( (tmp = file_time(SAVEPATH+str[0..0]+"/"+str+".o")) <= 0 )
MG Mud User88f12472016-06-24 23:31:02 +0200214 // Hack, um bei ganz "frischen" Spielern (noch kein Savefile vorhanden)
215 // die Ausgabe von 1.1.1970 zu verhindern
216 tmp = time();
Rumataebf937b2025-06-28 16:18:10 +0200217 last=pdata->QueryProp(P_LAST_LOGOUT);
MG Mud User88f12472016-06-24 23:31:02 +0200218 if ( last <= 0 || (!(flags&FLAG_VIS_LOGOUT) && wiz && wizlevel > 10
Rumataebf937b2025-06-28 16:18:10 +0200219 && pdata->QueryProp(P_INVIS) && tmp - last > 300) )
MG Mud User88f12472016-06-24 23:31:02 +0200220 last = tmp;
MG Mud User88f12472016-06-24 23:31:02 +0200221 /* output routine for all */
222 if(player) {
223 h=player->QueryProp(P_RACE);
224 if(interactive(player) && (wiz || !invis)) {
225 text+=capitalize(str)+" ist anwesend,\n"+
226 "und zwar von: "+
227 (wiz ? (ip+(ipnum?" ("+ipnum+")":"")):"")+
Rumataebf937b2025-06-28 16:18:10 +0200228 (stringp(pdata->QueryProp(P_LOCATION)) ? (wiz ? "\n [" : "")
229 +capitalize(pdata->QueryProp(P_LOCATION))+
230 ((pdata->QueryProp(P_LOCATION) != country(ip, ipnum))
MG Mud User88f12472016-06-24 23:31:02 +0200231 ? " (ueber "+country(ip, ipnum)+")" : "" )
232 : (wiz?" [":"")+country(ip, ipnum))+(wiz ? "]":"")+".\n";
233 if(idle)
234 text+="Passiv seit: "+timediff(idle)+"\n";
235 if (local)
Rumataebf937b2025-06-28 16:18:10 +0200236 text+="Eingeloggt seit: "+dtime(pdata->QueryProp(P_LAST_LOGIN))+"\n";
237 if (pdata->QueryProp(P_AWAY))
238 away="z.Z. abwesend, Grund : "+pdata->QueryProp(P_AWAY)+"\n";
MG Mud User88f12472016-06-24 23:31:02 +0200239 } else
240 text+=capitalize(str)+" ist nicht anwesend.\nZuletzt eingeloggt von: "+
241 (wiz ? (ip+(ipnum&&ipnum!=ip?" ("+ipnum+")":"")):"")+
Rumataebf937b2025-06-28 16:18:10 +0200242 (stringp(pdata->QueryProp(P_LOCATION)) ?
MG Mud User88f12472016-06-24 23:31:02 +0200243 (wiz ? "\n [": "")
Rumataebf937b2025-06-28 16:18:10 +0200244 +capitalize(pdata->QueryProp(P_LOCATION))+" (ueber "+country(ip, ipnum)+")":
MG Mud User88f12472016-06-24 23:31:02 +0200245 (wiz?" [":"")+country(ip, ipnum))+(wiz ? "]":"")+".\n"+
246 "Zuletzt ausgeloggt: "+dtime(last)+" ("+timediff(time()-last)+").\n";
247 }
248 else {
249 text+=capitalize(str)+" ist nicht anwesend.\nZuletzt eingeloggt von: "+
250 (wiz ? (ip+(ipnum&&ipnum!=ip?" ("+ipnum+")":"")):"")+
Rumataebf937b2025-06-28 16:18:10 +0200251 (stringp(pdata->QueryProp(P_LOCATION)) ?
MG Mud User88f12472016-06-24 23:31:02 +0200252 (wiz ? "\n [": "")
Rumataebf937b2025-06-28 16:18:10 +0200253 +capitalize(pdata->QueryProp(P_LOCATION))+" (ueber "+country(ip, ipnum)+")":
MG Mud User88f12472016-06-24 23:31:02 +0200254 (wiz?" [":"")+country(ip, ipnum))+(wiz ? "]":"")+".\n"+
255 "Zuletzt ausgeloggt: "+dtime(last)+" ("+timediff(time()-last)+").\n";
256 }
Rumataebf937b2025-06-28 16:18:10 +0200257 text+="Voller Name: "+(((h=pdata->QueryProp(P_PRESAY)) && h!="") ? h+" " : "")+
258 capitalize((h=pdata->QueryProp(P_NAME)) ? h : str)+" "+
259 ((h=pdata->QueryProp(P_TITLE)) ? h :
260 ((mappingp(h=pdata->QueryProp("guild_title")) && (h=(h[pdata->QueryProp(P_GUILD)?pdata->QueryProp(P_GUILD):"abenteurer"])) ) ? h : "") )
MG Mud User88f12472016-06-24 23:31:02 +0200261 +"\n";
262
Rumataebf937b2025-06-28 16:18:10 +0200263 if (pdata->QueryProp(P_GHOST)) text+="Hoppla, ein Geist!\n";
264 if ((flags&FLAG_LONG)&&pdata->QueryProp(P_LONG))
265 text+="Beschreibung: \n"+break_string(pdata->QueryProp(P_LONG),78,2);
MG Mud User88f12472016-06-24 23:31:02 +0200266
267 if(wiz ||
Rumataebf937b2025-06-28 16:18:10 +0200268 (pdata->QueryProp(P_SHOWEMAIL)=="alle") ||
269 ( (pdata->QueryProp(P_SHOWEMAIL)=="freunde") &&
MG Mud User88f12472016-06-24 23:31:02 +0200270 objectp(player) &&
271 this_player() &&
272 (ob=present("\n\bfband",player)) &&
273 pointerp(tmp=ob->QueryProp(P_AUTOLOADOBJ)) &&
274 pointerp(tmp=tmp[1]) &&
275 (member(tmp,getuid(this_player()))!=-1))) tmp = 1;
276 else tmp=0;
Rumataebf937b2025-06-28 16:18:10 +0200277 string shell=pdata->QueryProp(P_RACE);
Zesstra9b9531f2020-01-21 20:45:35 +0100278 if (!stringp(shell))
Zesstracd25d262020-01-21 19:36:39 +0100279 {
Zesstra9b9531f2020-01-21 20:45:35 +0100280 shell = master()->query_userlist(str, USER_OBJECT);
Zesstracd25d262020-01-21 19:36:39 +0100281 shell = capitalize(explode(shell, "/")[3]);
282 shell =(["Human":"Mensch","Dwarf":"Zwerg","Darkelf":"Dunkelelf",
283 "Orc":"Ork"])[shell] || shell;
MG Mud User88f12472016-06-24 23:31:02 +0200284 }
285
Zesstracd25d262020-01-21 19:36:39 +0100286 if (!stringp(shell)) shell="<keine>";
287 int creation = master()->query_userlist(str, USER_CREATION_DATE);
288 text+="Rasse: "+shell+", Gilde: "+
Rumataebf937b2025-06-28 16:18:10 +0200289 ((h=pdata->QueryProp(P_VISIBLE_GUILD))?capitalize(h):((h=pdata->QueryProp(P_GUILD))?capitalize(h):"Abenteurer"))+
290 ((h=pdata->QueryProp(P_VISIBLE_SUBGUILD_TITLE))?" ("+capitalize(h)+")":((h=pdata->QueryProp(P_SUBGUILD_TITLE))?" ("+capitalize(h)+")":""))+
291 ", Geschlecht: "+({"neutral ?!","maennlich","weiblich","<verdammt seltsam>"})[pdata->QueryProp(P_GENDER)]+"\n"+
MG Mud User88f12472016-06-24 23:31:02 +0200292 (seer ? "Alter: "+timediff(age*HBINT)+", " : "")+
293 (wizlevel>=10?"Magierlevel: "+wizlevel+
294 (wizlevel>=GOD_LVL?" (Mudgott)":str=="boing"?" (Mudgott a.D.)":str=="muadib"?" (Apostolischer Visitator)":wizlevel>=ARCH_LVL?" (Erzmagier)":IS_DEPUTY(str)?" (Hilfssheriff)":wizlevel>=ELDER_LVL?" (Weiser)":wizlevel>=LORD_LVL?" (Regionsmagier)":wizlevel>=SPECIAL_LVL?" (Hilfsmagier)":wizlevel>=DOMAINMEMBER_LVL?" (Regionsmitarbeiter)":wizlevel>WIZARD_LVL?" (Vollmagier)":" (Lehrling)"):
Rumataebf937b2025-06-28 16:18:10 +0200295 ("Spielerlevel: "+pdata->QueryProp(P_LEVEL)+( wizlevel ? " (Seher"+IN+")" : "" )+
296 (((h=pdata->QueryProp(P_GUILD_LEVEL)) && h=h[pdata->QueryProp(P_GUILD)]) ?
MG Mud User88f12472016-06-24 23:31:02 +0200297 (", Gildenlevel: "+h) : "" )
Zesstracd25d262020-01-21 19:36:39 +0100298 )) + ((sprintf("\nDatum des ersten Login: %s",
299 (creation > 0) ? dtime(creation) : "vor dem 10. Nov 1995")))+
Rumataebf937b2025-06-28 16:18:10 +0200300 (tmp ? ("\nE-Mail-Adresse: "+((h=pdata->QueryProp(P_MAILADDR)) ? h : "keine")+"\n") : "\n");
MG Mud User88f12472016-06-24 23:31:02 +0200301
Rumataebf937b2025-06-28 16:18:10 +0200302 if (pdata->QueryProp(P_HOMEPAGE))
303 text+="Homepage: "+pdata->QueryProp(P_HOMEPAGE)+"\n";
MG Mud User88f12472016-06-24 23:31:02 +0200304
Rumataebf937b2025-06-28 16:18:10 +0200305 if (stringp(data=pdata->QueryProp(P_MESSENGER))) {
MG Mud User88f12472016-06-24 23:31:02 +0200306 text+=sprintf("Messenger: %s", data);
Rumataebf937b2025-06-28 16:18:10 +0200307 if (intp(data=pdata->QueryProp(P_ICQ))) {
MG Mud User88f12472016-06-24 23:31:02 +0200308 if (data<0 && IS_WIZARD(this_player())) data*=-1;
309 if (data>0) text += sprintf(", ICQ: %d", data);
310 }
311 text+="\n";
312 } else
Rumataebf937b2025-06-28 16:18:10 +0200313 if (intp(data=pdata->QueryProp(P_ICQ))) {
MG Mud User88f12472016-06-24 23:31:02 +0200314 if (data<0 && IS_WIZARD(this_player()))
315 data*=-1;
316 if (data>0)
317 text+=sprintf("ICQ: %d\n",data);
318 }
319
Rumataebf937b2025-06-28 16:18:10 +0200320 if (pdata->QueryProp(P_MARRIED))
321 text+="Verheiratet mit: "+capitalize(pdata->QueryProp(P_MARRIED))+"\n";
MG Mud User88f12472016-06-24 23:31:02 +0200322
Rumataebf937b2025-06-28 16:18:10 +0200323 if ( pointerp(pdata->QueryProp(P_SIBLINGS)) )
324 text += ({ "Es", "Er", "Sie" })[pdata->QueryProp(P_GENDER)] + " ist Bluts" +
MG Mud User88f12472016-06-24 23:31:02 +0200325 ({ "verwandt mit ", "bruder von ", "schwester von " })
Rumataebf937b2025-06-28 16:18:10 +0200326 [pdata->QueryProp(P_GENDER)] +
327 CountUp(pdata->QueryProp(P_SIBLINGS)) + ".\n";
MG Mud User88f12472016-06-24 23:31:02 +0200328
329 text+=away;
Rumataebf937b2025-06-28 16:18:10 +0200330
MG Mud User88f12472016-06-24 23:31:02 +0200331 if(MASTER->check_late_player(str))
332 {
333 text+=capitalize(str)+" hat uns leider fuer immer verlassen.\n";
334 }
335 else
336 {
337 if (h=MASTER->QueryTBanished(str))
338 text+=capitalize(str)+" will fruehestens "+h[TBANISH_EXTRACT];
339 }
340
Rumataebf937b2025-06-28 16:18:10 +0200341 if (h=pdata->QueryProp(P_TESTPLAYER))
MG Mud User88f12472016-06-24 23:31:02 +0200342 {
343 text+=capitalize(str)+" ist Testspieler"+IN;
344 if (stringp(h)) text+=" ("+h+")";
345 text+=".\n";
346 }
Rumataebf937b2025-06-28 16:18:10 +0200347 if ( h=pdata->QueryProp(P_SECOND))
MG Mud User88f12472016-06-24 23:31:02 +0200348 {
349 if (IS_WIZARD(this_player())) {
350 text+=capitalize(str)+" ist";
Rumataebf937b2025-06-28 16:18:10 +0200351 switch(pdata->QueryProp(P_SECOND_MARK)) {
MG Mud User88f12472016-06-24 23:31:02 +0200352 case -1: text+=" unsichtbar markierte"
Rumataebf937b2025-06-28 16:18:10 +0200353 +(pdata->QueryProp(P_GENDER)!=FEMALE ? "r": "");
MG Mud User88f12472016-06-24 23:31:02 +0200354 break;
355 case 0: text+=" nicht namentlich markierte"
Rumataebf937b2025-06-28 16:18:10 +0200356 +(pdata->QueryProp(P_GENDER)!=FEMALE ? "r": "");
MG Mud User88f12472016-06-24 23:31:02 +0200357 break;
358 default:
359 }
360 text+=" Zweitspieler"+IN;
361 if (stringp(h))
362 text+=" ("+capitalize(h)+")";
363 text+=".\n";
364 }
Rumataebf937b2025-06-28 16:18:10 +0200365 else if (pdata->QueryProp(P_SECOND_MARK)>0)
MG Mud User88f12472016-06-24 23:31:02 +0200366 {
367 text+=capitalize(str)+" ist Zweitspieler"+IN;
368 if (stringp(h))
369 text+=" ("+capitalize(h)+")";
370 text+=".\n";
371 }
Rumataebf937b2025-06-28 16:18:10 +0200372 else if (pdata->QueryProp(P_SECOND_MARK)>-1)
MG Mud User88f12472016-06-24 23:31:02 +0200373 text+=capitalize(str)+" ist Zweitspieler"+IN+".\n";
374 }
Rumataebf937b2025-06-28 16:18:10 +0200375
376 if (pdata->QueryProp(P_DEADS))
MG Mud User88f12472016-06-24 23:31:02 +0200377 {
Rumataebf937b2025-06-28 16:18:10 +0200378 text+="Bisher bereits "+pdata->QueryProp(P_DEADS)+" mal gestorben\n";
MG Mud User88f12472016-06-24 23:31:02 +0200379 // Bezieht sich nur auf den Zeitraum ab dem 30.11.'94
380 }
381 if(hc_play==1)
382 {
383 text+=capitalize(str)+" ist sehr mutig.\n";
384 }
385 if(hc_play>1)
386 {
387 text+=capitalize(str)+" ist am "+dtime(hc_play)+" in das Nirvana eingegangen.\n";
388 }
Rumataebf937b2025-06-28 16:18:10 +0200389
Zesstracd25d262020-01-21 19:36:39 +0100390 data=master()->query_userlist(str, USER_DOMAIN);
Rumataebf937b2025-06-28 16:18:10 +0200391 if (sizeof(data)) {
Zesstracd25d262020-01-21 19:36:39 +0100392 text+="Regionsmagier"+IN+" von : "
393 +implode(map(data,#'capitalize),", ")+".\n";
Rumataebf937b2025-06-28 16:18:10 +0200394 }
395
Zesstracd25d262020-01-21 19:36:39 +0100396 data="/secure/master"->get_domain_homes(str);
397 data=filter(data-({"erzmagier"}),#'stringp);
398 if ((wizlevel>=DOMAINMEMBER_LVL) && (sizeof(data)))
399 text+="Regionsmitarbeiter"+IN+" von: "
400 +implode(map(data,#'capitalize),", ")+".\n";
MG Mud User88f12472016-06-24 23:31:02 +0200401
Zesstracd25d262020-01-21 19:36:39 +0100402 data=master()->query_userlist(str, USER_GUILD);
MG Mud User88f12472016-06-24 23:31:02 +0200403 if (sizeof(data))
Zesstracd25d262020-01-21 19:36:39 +0100404 text += "Gildenmagier"+IN+" von : "
405 +implode(map(data, #'capitalize), ", ")+".\n";
MG Mud User88f12472016-06-24 23:31:02 +0200406
407 // ggf. Avatar-URI mit ausgeben.
408 if (flags & FLAG_AVATAR
Rumataebf937b2025-06-28 16:18:10 +0200409 && stringp(pdata->QueryProp(P_AVATAR_URI)))
410 text += "Avatar-URI: " + pdata->QueryProp(P_AVATAR_URI) + "\n";
MG Mud User88f12472016-06-24 23:31:02 +0200411
412 if (flags & FLAG_SPONSOR)
413 text+=sponsoring(str);
414
415 filename="/players/"+str+"/.project";
416 if(file_size(filename)>=0)
417 text+="Projekt: "+explode(read_file(filename), "\n")[0]+"\n";
418 else {
419 filename="/p/service/loco/plans/"+str+".project";
420 if(file_size(filename)>=0)
421 text+="Projekt: "+explode(read_file(filename), "\n")[0]+"\n";
422 }
423 if (seer && !(flags&FLAG_NOPLAN)) {
424 filename="/players/"+str+"/.plan";
425 if(file_size(filename)>=0)
426 text+="Plan:\n"+read_file(filename);
427 else {
428 filename="/p/service/loco/plans/"+str+".plan";
429 if(file_size(filename)>=0)
430 text+="Plan:\n"+read_file(filename);
431// else
432// text+="Keine .plan-Datei.\n";
433 }
434 }
435 properties=0;
Bugfix928e56f2018-07-26 17:20:30 +0200436 text=break_string(text,78,0,BS_LEAVE_MY_LFS);
MG Mud User88f12472016-06-24 23:31:02 +0200437 if (!local)
438 return text;
439 this_player()->More(text);
Rumataebf937b2025-06-28 16:18:10 +0200440 pdata=0;
MG Mud User88f12472016-06-24 23:31:02 +0200441 return "";
442}
443
444string Finger(string str)
445{
446 if(!str || str=="") { notify_fail("Wen denn?\n"); return 0; }
447 else
448 return finger_single(str,1);
449}