blob: 7fc27e795788988ebe54a7dff47722e7f668356a [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
Rumata4e978f52025-06-28 16:57:31 +020069mixed Query( mixed key ) {
70 return properties[key];
71}
72
MG Mud User88f12472016-06-24 23:31:02 +020073string timediff(int time)
74{
75 string ret;
76
77 ret="";
78 if ( time >= 86400*365 ) {
79 ret+=time/(86400*365)+"a ";
80 time%=(86400*365);
81 }
82 if(time>=86400) {
83 ret+=time/86400+"d ";
84 time%=86400;
85 }
86 if(time<36000) ret+="0";
87 ret+=time/3600+":";
88 time%=3600;
89 if(time<600) ret+="0";
90 ret+=time/60+":";
91 time%=60;
92 if(time<10) ret+="0";
93 ret+=time+"";
94 return ret;
95}
96
97string sponsoring(string name)
98{
MG Mud User88f12472016-06-24 23:31:02 +020099 string *s,s2,s3,s4;
100 // Daten einlesen, wenn die daten aelter als 1 Tag sind oder sich
Zesstra0db0e6c2020-04-22 00:00:50 +0200101 // /data/etc/SPONSOR geaendert hat.
MG Mud User88f12472016-06-24 23:31:02 +0200102 if ((time() > filetime+86400) ||
Zesstra0db0e6c2020-04-22 00:00:50 +0200103 filetime!=file_time("/data/etc/SPONSOR"))
MG Mud User88f12472016-06-24 23:31:02 +0200104 {
105 relatives=m_allocate(0,2);
Zesstra0db0e6c2020-04-22 00:00:50 +0200106 filetime=file_time("/data/etc/SPONSOR");
107 s=explode(read_file("/data/etc/SPONSOR"),"\n");
MG Mud User88f12472016-06-24 23:31:02 +0200108 foreach(string str: s) {
109 sscanf(str,"%s: %s macht %s zum Learner.",s2,s3,s4);
110 if (IS_LEARNER(lower_case(s3)) && IS_LEARNER(lower_case(s4)))
111 {
112 relatives[lower_case(s4),0]=s3;
113 s3=lower_case(s3);
114 s4+=" ("+query_wiz_level(lower_case(s4))+")";
115 if (!relatives[s3,1]) relatives[s3,1]=({s4});
116 else relatives[s3,1]+=({s4});
117 }
118 }
119 }
120 s2="";
121 if (relatives[name,0])
122 s2+="Vorfahre: "+relatives[name,0]+"\n";
123 if (relatives[name,1])
124 s2+="Nachfahre(n): "+break_string(implode(relatives[name,1],", "),78,14)[14..];
125 return s2;
126}
127
128varargs string finger_single(string str,int local)
129{
MG Mud User88f12472016-06-24 23:31:02 +0200130 string ip,text,ipnum,filename,away;
Zesstrae9c7b6f2021-05-07 09:33:25 +0200131 int wizlevel,idle,flags,last;
MG Mud User88f12472016-06-24 23:31:02 +0200132 mixed h,data,tmp;
133 object player,ob;
Rumataebf937b2025-06-28 16:18:10 +0200134 object pdata;
MG Mud User88f12472016-06-24 23:31:02 +0200135
136 /*DEBUG### tell_object((find_player("loco")||this_object()),"Finger request: '"+str+"'("+local+")\n");/**/
137 str=lower_case(str);
138 text="";
139 away="";
140 hc_play=0;
141
142 h=explode(str," ");
143 if (sizeof(h)==1) h=explode(str,"+");
144 if (member(h,"-n")>=0) flags=FLAG_NOPLAN;
145 if (member(h,"-p")>=0) flags=0;
146 if (member(h,"-l")>=0) flags|=FLAG_LONG;
147 if (member(h,"-s")>=0) flags|=FLAG_SPONSOR;
148 if (member(h,"-v")>=0) flags|=FLAG_VIS_LOGOUT;
149 if (member(h,"-a")>=0) flags|=FLAG_AVATAR;
150
151 h=(h-({"-n","-p","-l","-s", "-v","-a"}));
152 if (!sizeof(h)) {
153 text="Du solltest schon sagen, wer Dich interessiert!\n";
154 if (local) return write(text),0;
155 else return text;
156 }
157 str=h[0];
158 if (!sizeof(str) || str[0]<'a' || str[0]>'z') {
159 text="Also, so ("+str+") heisst bestimmt kein Spieler hier!\n";
160 if (local) return write(text),0;
161 else return text;
162 }
163
164 /* does this player exist? */
165 str=old_explode(str,".")[0];
MG Mud User88f12472016-06-24 23:31:02 +0200166 player=find_player(str)||find_netdead(str);
167
Zesstracd25d262020-01-21 19:36:39 +0100168 if( (!master()->find_userinfo(str) && !player) )
169 {
MG Mud User88f12472016-06-24 23:31:02 +0200170 text="Hmm... diesen Namen gibt es im "MUDNAME" nicht.\n";
171 if (tmp="/secure/master"->QueryBanished(str)){
172 text="Hoppla - dieser Name ist reserviert oder gesperrt (\"gebanisht\")!\n";
173 if ( tmp != "Dieser Name ist gesperrt." )
174 text += "Grund fuer die Sperrung: " + tmp +
175 (member( ({'!','?','.'}), tmp[<1] ) != -1 ? "" : ".") + "\n";
176 }
177 if (local) return write(text),0;
178 else return text;
179 }
180
181 if (player) {
182 hc_play=player->query_hc_play();
Rumataebf937b2025-06-28 16:18:10 +0200183 pdata = player;
MG Mud User88f12472016-06-24 23:31:02 +0200184 tmp = player->QueryProp(P_PRESAY);
Rumataebf937b2025-06-28 16:18:10 +0200185 //properties[P_PRESAY]=(stringp(tmp) && sizeof(tmp)>1) ? tmp[0..<2] : 0;
MG Mud User88f12472016-06-24 23:31:02 +0200186 }
Rumataebf937b2025-06-28 16:18:10 +0200187 else {
Bugfix860e85a2020-12-11 12:35:28 +0100188 restore_object(SAVEPATH+str[0..0]+"/"+str);
Rumataebf937b2025-06-28 16:18:10 +0200189 if (!properties) {
190 text+="Mist!!! Das Einlesen der Daten klappt nicht wie es soll :-(\n";
191 if (!local)
192 return text;
193 write(text);
194 return "";
195 }
196 pdata = this_object();
MG Mud User88f12472016-06-24 23:31:02 +0200197 }
Rumataebf937b2025-06-28 16:18:10 +0200198
MG Mud User88f12472016-06-24 23:31:02 +0200199 if ( player && interactive(player) )
200 ipnum = query_ip_number(player);
201 else
Rumataebf937b2025-06-28 16:18:10 +0200202 ipnum = pdata->QueryProp(P_CALLED_FROM_IP);
MG Mud User88f12472016-06-24 23:31:02 +0200203 // frueher stand in P_CALLED_FROM_IP evtl. auch der Name direkt drin
204 // anstelle der numerischen IP
Rumataebf937b2025-06-28 16:18:10 +0200205 ip=query_ip_name(ipnum)||pdata->QueryProp(P_CALLED_FROM_IP);
MG Mud User88f12472016-06-24 23:31:02 +0200206 if(player) {
207 if (!interactive(player) || (idle=query_idle(player))<MINIDLE)
208 idle=0;
209 if (!(invis=age=player->QueryProp(P_INVIS)))
210 age=player->QueryProp(P_AGE);
211 } else {
Rumataebf937b2025-06-28 16:18:10 +0200212 if (pdata->QueryProp(P_INVIS)) age=pdata->QueryProp(P_INVIS);
213 idle=pdata->QueryProp(P_LAST_LOGOUT);
MG Mud User88f12472016-06-24 23:31:02 +0200214 }
215
216 wizlevel=query_wiz_level(str);
Bugfix860e85a2020-12-11 12:35:28 +0100217 if ( (tmp = file_time(SAVEPATH+str[0..0]+"/"+str+".o")) <= 0 )
MG Mud User88f12472016-06-24 23:31:02 +0200218 // Hack, um bei ganz "frischen" Spielern (noch kein Savefile vorhanden)
219 // die Ausgabe von 1.1.1970 zu verhindern
220 tmp = time();
Rumataebf937b2025-06-28 16:18:10 +0200221 last=pdata->QueryProp(P_LAST_LOGOUT);
MG Mud User88f12472016-06-24 23:31:02 +0200222 if ( last <= 0 || (!(flags&FLAG_VIS_LOGOUT) && wiz && wizlevel > 10
Rumataebf937b2025-06-28 16:18:10 +0200223 && pdata->QueryProp(P_INVIS) && tmp - last > 300) )
MG Mud User88f12472016-06-24 23:31:02 +0200224 last = tmp;
MG Mud User88f12472016-06-24 23:31:02 +0200225 /* output routine for all */
226 if(player) {
227 h=player->QueryProp(P_RACE);
228 if(interactive(player) && (wiz || !invis)) {
229 text+=capitalize(str)+" ist anwesend,\n"+
230 "und zwar von: "+
231 (wiz ? (ip+(ipnum?" ("+ipnum+")":"")):"")+
Rumataebf937b2025-06-28 16:18:10 +0200232 (stringp(pdata->QueryProp(P_LOCATION)) ? (wiz ? "\n [" : "")
233 +capitalize(pdata->QueryProp(P_LOCATION))+
234 ((pdata->QueryProp(P_LOCATION) != country(ip, ipnum))
MG Mud User88f12472016-06-24 23:31:02 +0200235 ? " (ueber "+country(ip, ipnum)+")" : "" )
236 : (wiz?" [":"")+country(ip, ipnum))+(wiz ? "]":"")+".\n";
237 if(idle)
238 text+="Passiv seit: "+timediff(idle)+"\n";
239 if (local)
Rumataebf937b2025-06-28 16:18:10 +0200240 text+="Eingeloggt seit: "+dtime(pdata->QueryProp(P_LAST_LOGIN))+"\n";
241 if (pdata->QueryProp(P_AWAY))
242 away="z.Z. abwesend, Grund : "+pdata->QueryProp(P_AWAY)+"\n";
MG Mud User88f12472016-06-24 23:31:02 +0200243 } else
244 text+=capitalize(str)+" ist nicht anwesend.\nZuletzt eingeloggt von: "+
245 (wiz ? (ip+(ipnum&&ipnum!=ip?" ("+ipnum+")":"")):"")+
Rumataebf937b2025-06-28 16:18:10 +0200246 (stringp(pdata->QueryProp(P_LOCATION)) ?
MG Mud User88f12472016-06-24 23:31:02 +0200247 (wiz ? "\n [": "")
Rumataebf937b2025-06-28 16:18:10 +0200248 +capitalize(pdata->QueryProp(P_LOCATION))+" (ueber "+country(ip, ipnum)+")":
MG Mud User88f12472016-06-24 23:31:02 +0200249 (wiz?" [":"")+country(ip, ipnum))+(wiz ? "]":"")+".\n"+
250 "Zuletzt ausgeloggt: "+dtime(last)+" ("+timediff(time()-last)+").\n";
251 }
252 else {
253 text+=capitalize(str)+" ist nicht anwesend.\nZuletzt eingeloggt von: "+
254 (wiz ? (ip+(ipnum&&ipnum!=ip?" ("+ipnum+")":"")):"")+
Rumataebf937b2025-06-28 16:18:10 +0200255 (stringp(pdata->QueryProp(P_LOCATION)) ?
MG Mud User88f12472016-06-24 23:31:02 +0200256 (wiz ? "\n [": "")
Rumataebf937b2025-06-28 16:18:10 +0200257 +capitalize(pdata->QueryProp(P_LOCATION))+" (ueber "+country(ip, ipnum)+")":
MG Mud User88f12472016-06-24 23:31:02 +0200258 (wiz?" [":"")+country(ip, ipnum))+(wiz ? "]":"")+".\n"+
259 "Zuletzt ausgeloggt: "+dtime(last)+" ("+timediff(time()-last)+").\n";
260 }
Rumataebf937b2025-06-28 16:18:10 +0200261 text+="Voller Name: "+(((h=pdata->QueryProp(P_PRESAY)) && h!="") ? h+" " : "")+
262 capitalize((h=pdata->QueryProp(P_NAME)) ? h : str)+" "+
263 ((h=pdata->QueryProp(P_TITLE)) ? h :
264 ((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 +0200265 +"\n";
266
Rumataebf937b2025-06-28 16:18:10 +0200267 if (pdata->QueryProp(P_GHOST)) text+="Hoppla, ein Geist!\n";
268 if ((flags&FLAG_LONG)&&pdata->QueryProp(P_LONG))
269 text+="Beschreibung: \n"+break_string(pdata->QueryProp(P_LONG),78,2);
MG Mud User88f12472016-06-24 23:31:02 +0200270
271 if(wiz ||
Rumataebf937b2025-06-28 16:18:10 +0200272 (pdata->QueryProp(P_SHOWEMAIL)=="alle") ||
273 ( (pdata->QueryProp(P_SHOWEMAIL)=="freunde") &&
MG Mud User88f12472016-06-24 23:31:02 +0200274 objectp(player) &&
275 this_player() &&
276 (ob=present("\n\bfband",player)) &&
277 pointerp(tmp=ob->QueryProp(P_AUTOLOADOBJ)) &&
278 pointerp(tmp=tmp[1]) &&
279 (member(tmp,getuid(this_player()))!=-1))) tmp = 1;
280 else tmp=0;
Rumataebf937b2025-06-28 16:18:10 +0200281 string shell=pdata->QueryProp(P_RACE);
Zesstra9b9531f2020-01-21 20:45:35 +0100282 if (!stringp(shell))
Zesstracd25d262020-01-21 19:36:39 +0100283 {
Zesstra9b9531f2020-01-21 20:45:35 +0100284 shell = master()->query_userlist(str, USER_OBJECT);
Zesstracd25d262020-01-21 19:36:39 +0100285 shell = capitalize(explode(shell, "/")[3]);
286 shell =(["Human":"Mensch","Dwarf":"Zwerg","Darkelf":"Dunkelelf",
287 "Orc":"Ork"])[shell] || shell;
MG Mud User88f12472016-06-24 23:31:02 +0200288 }
289
Zesstracd25d262020-01-21 19:36:39 +0100290 if (!stringp(shell)) shell="<keine>";
291 int creation = master()->query_userlist(str, USER_CREATION_DATE);
292 text+="Rasse: "+shell+", Gilde: "+
Rumataebf937b2025-06-28 16:18:10 +0200293 ((h=pdata->QueryProp(P_VISIBLE_GUILD))?capitalize(h):((h=pdata->QueryProp(P_GUILD))?capitalize(h):"Abenteurer"))+
294 ((h=pdata->QueryProp(P_VISIBLE_SUBGUILD_TITLE))?" ("+capitalize(h)+")":((h=pdata->QueryProp(P_SUBGUILD_TITLE))?" ("+capitalize(h)+")":""))+
295 ", Geschlecht: "+({"neutral ?!","maennlich","weiblich","<verdammt seltsam>"})[pdata->QueryProp(P_GENDER)]+"\n"+
MG Mud User88f12472016-06-24 23:31:02 +0200296 (seer ? "Alter: "+timediff(age*HBINT)+", " : "")+
297 (wizlevel>=10?"Magierlevel: "+wizlevel+
298 (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 +0200299 ("Spielerlevel: "+pdata->QueryProp(P_LEVEL)+( wizlevel ? " (Seher"+IN+")" : "" )+
Rumata4e978f52025-06-28 16:57:31 +0200300 (((h=pdata->Query(P_GUILD_LEVEL)) && h=h[pdata->Query(P_GUILD)]) ?
MG Mud User88f12472016-06-24 23:31:02 +0200301 (", Gildenlevel: "+h) : "" )
Zesstracd25d262020-01-21 19:36:39 +0100302 )) + ((sprintf("\nDatum des ersten Login: %s",
303 (creation > 0) ? dtime(creation) : "vor dem 10. Nov 1995")))+
Rumataebf937b2025-06-28 16:18:10 +0200304 (tmp ? ("\nE-Mail-Adresse: "+((h=pdata->QueryProp(P_MAILADDR)) ? h : "keine")+"\n") : "\n");
MG Mud User88f12472016-06-24 23:31:02 +0200305
Rumataebf937b2025-06-28 16:18:10 +0200306 if (pdata->QueryProp(P_HOMEPAGE))
307 text+="Homepage: "+pdata->QueryProp(P_HOMEPAGE)+"\n";
MG Mud User88f12472016-06-24 23:31:02 +0200308
Rumataebf937b2025-06-28 16:18:10 +0200309 if (stringp(data=pdata->QueryProp(P_MESSENGER))) {
MG Mud User88f12472016-06-24 23:31:02 +0200310 text+=sprintf("Messenger: %s", data);
Rumataebf937b2025-06-28 16:18:10 +0200311 if (intp(data=pdata->QueryProp(P_ICQ))) {
MG Mud User88f12472016-06-24 23:31:02 +0200312 if (data<0 && IS_WIZARD(this_player())) data*=-1;
313 if (data>0) text += sprintf(", ICQ: %d", data);
314 }
315 text+="\n";
316 } else
Rumataebf937b2025-06-28 16:18:10 +0200317 if (intp(data=pdata->QueryProp(P_ICQ))) {
MG Mud User88f12472016-06-24 23:31:02 +0200318 if (data<0 && IS_WIZARD(this_player()))
319 data*=-1;
320 if (data>0)
321 text+=sprintf("ICQ: %d\n",data);
322 }
323
Rumataebf937b2025-06-28 16:18:10 +0200324 if (pdata->QueryProp(P_MARRIED))
325 text+="Verheiratet mit: "+capitalize(pdata->QueryProp(P_MARRIED))+"\n";
MG Mud User88f12472016-06-24 23:31:02 +0200326
Rumataebf937b2025-06-28 16:18:10 +0200327 if ( pointerp(pdata->QueryProp(P_SIBLINGS)) )
328 text += ({ "Es", "Er", "Sie" })[pdata->QueryProp(P_GENDER)] + " ist Bluts" +
MG Mud User88f12472016-06-24 23:31:02 +0200329 ({ "verwandt mit ", "bruder von ", "schwester von " })
Rumataebf937b2025-06-28 16:18:10 +0200330 [pdata->QueryProp(P_GENDER)] +
331 CountUp(pdata->QueryProp(P_SIBLINGS)) + ".\n";
MG Mud User88f12472016-06-24 23:31:02 +0200332
333 text+=away;
Rumataebf937b2025-06-28 16:18:10 +0200334
MG Mud User88f12472016-06-24 23:31:02 +0200335 if(MASTER->check_late_player(str))
336 {
337 text+=capitalize(str)+" hat uns leider fuer immer verlassen.\n";
338 }
339 else
340 {
341 if (h=MASTER->QueryTBanished(str))
342 text+=capitalize(str)+" will fruehestens "+h[TBANISH_EXTRACT];
343 }
344
Rumataebf937b2025-06-28 16:18:10 +0200345 if (h=pdata->QueryProp(P_TESTPLAYER))
MG Mud User88f12472016-06-24 23:31:02 +0200346 {
347 text+=capitalize(str)+" ist Testspieler"+IN;
348 if (stringp(h)) text+=" ("+h+")";
349 text+=".\n";
350 }
Rumataebf937b2025-06-28 16:18:10 +0200351 if ( h=pdata->QueryProp(P_SECOND))
MG Mud User88f12472016-06-24 23:31:02 +0200352 {
353 if (IS_WIZARD(this_player())) {
354 text+=capitalize(str)+" ist";
Rumataebf937b2025-06-28 16:18:10 +0200355 switch(pdata->QueryProp(P_SECOND_MARK)) {
MG Mud User88f12472016-06-24 23:31:02 +0200356 case -1: text+=" unsichtbar markierte"
Rumataebf937b2025-06-28 16:18:10 +0200357 +(pdata->QueryProp(P_GENDER)!=FEMALE ? "r": "");
MG Mud User88f12472016-06-24 23:31:02 +0200358 break;
359 case 0: text+=" nicht namentlich markierte"
Rumataebf937b2025-06-28 16:18:10 +0200360 +(pdata->QueryProp(P_GENDER)!=FEMALE ? "r": "");
MG Mud User88f12472016-06-24 23:31:02 +0200361 break;
362 default:
363 }
364 text+=" Zweitspieler"+IN;
365 if (stringp(h))
366 text+=" ("+capitalize(h)+")";
367 text+=".\n";
368 }
Rumataebf937b2025-06-28 16:18:10 +0200369 else if (pdata->QueryProp(P_SECOND_MARK)>0)
MG Mud User88f12472016-06-24 23:31:02 +0200370 {
371 text+=capitalize(str)+" ist Zweitspieler"+IN;
372 if (stringp(h))
373 text+=" ("+capitalize(h)+")";
374 text+=".\n";
375 }
Rumataebf937b2025-06-28 16:18:10 +0200376 else if (pdata->QueryProp(P_SECOND_MARK)>-1)
MG Mud User88f12472016-06-24 23:31:02 +0200377 text+=capitalize(str)+" ist Zweitspieler"+IN+".\n";
378 }
Rumataebf937b2025-06-28 16:18:10 +0200379
380 if (pdata->QueryProp(P_DEADS))
MG Mud User88f12472016-06-24 23:31:02 +0200381 {
Rumataebf937b2025-06-28 16:18:10 +0200382 text+="Bisher bereits "+pdata->QueryProp(P_DEADS)+" mal gestorben\n";
MG Mud User88f12472016-06-24 23:31:02 +0200383 // Bezieht sich nur auf den Zeitraum ab dem 30.11.'94
384 }
385 if(hc_play==1)
386 {
387 text+=capitalize(str)+" ist sehr mutig.\n";
388 }
389 if(hc_play>1)
390 {
391 text+=capitalize(str)+" ist am "+dtime(hc_play)+" in das Nirvana eingegangen.\n";
392 }
Rumataebf937b2025-06-28 16:18:10 +0200393
Zesstracd25d262020-01-21 19:36:39 +0100394 data=master()->query_userlist(str, USER_DOMAIN);
Rumataebf937b2025-06-28 16:18:10 +0200395 if (sizeof(data)) {
Zesstracd25d262020-01-21 19:36:39 +0100396 text+="Regionsmagier"+IN+" von : "
397 +implode(map(data,#'capitalize),", ")+".\n";
Rumataebf937b2025-06-28 16:18:10 +0200398 }
399
Zesstracd25d262020-01-21 19:36:39 +0100400 data="/secure/master"->get_domain_homes(str);
401 data=filter(data-({"erzmagier"}),#'stringp);
402 if ((wizlevel>=DOMAINMEMBER_LVL) && (sizeof(data)))
403 text+="Regionsmitarbeiter"+IN+" von: "
404 +implode(map(data,#'capitalize),", ")+".\n";
MG Mud User88f12472016-06-24 23:31:02 +0200405
Zesstracd25d262020-01-21 19:36:39 +0100406 data=master()->query_userlist(str, USER_GUILD);
MG Mud User88f12472016-06-24 23:31:02 +0200407 if (sizeof(data))
Zesstracd25d262020-01-21 19:36:39 +0100408 text += "Gildenmagier"+IN+" von : "
409 +implode(map(data, #'capitalize), ", ")+".\n";
MG Mud User88f12472016-06-24 23:31:02 +0200410
411 // ggf. Avatar-URI mit ausgeben.
412 if (flags & FLAG_AVATAR
Rumataebf937b2025-06-28 16:18:10 +0200413 && stringp(pdata->QueryProp(P_AVATAR_URI)))
414 text += "Avatar-URI: " + pdata->QueryProp(P_AVATAR_URI) + "\n";
MG Mud User88f12472016-06-24 23:31:02 +0200415
416 if (flags & FLAG_SPONSOR)
417 text+=sponsoring(str);
418
419 filename="/players/"+str+"/.project";
420 if(file_size(filename)>=0)
421 text+="Projekt: "+explode(read_file(filename), "\n")[0]+"\n";
422 else {
423 filename="/p/service/loco/plans/"+str+".project";
424 if(file_size(filename)>=0)
425 text+="Projekt: "+explode(read_file(filename), "\n")[0]+"\n";
426 }
427 if (seer && !(flags&FLAG_NOPLAN)) {
428 filename="/players/"+str+"/.plan";
429 if(file_size(filename)>=0)
430 text+="Plan:\n"+read_file(filename);
431 else {
432 filename="/p/service/loco/plans/"+str+".plan";
433 if(file_size(filename)>=0)
434 text+="Plan:\n"+read_file(filename);
435// else
436// text+="Keine .plan-Datei.\n";
437 }
438 }
439 properties=0;
Bugfix928e56f2018-07-26 17:20:30 +0200440 text=break_string(text,78,0,BS_LEAVE_MY_LFS);
MG Mud User88f12472016-06-24 23:31:02 +0200441 if (!local)
442 return text;
443 this_player()->More(text);
Rumataebf937b2025-06-28 16:18:10 +0200444 pdata=0;
MG Mud User88f12472016-06-24 23:31:02 +0200445 return "";
446}
447
448string Finger(string str)
449{
450 if(!str || str=="") { notify_fail("Wen denn?\n"); return 0; }
451 else
452 return finger_single(str,1);
453}