void do_dthink(struct char_data *ch, char *argument, int cmd) { char buf[MAX_INPUT_LENGTH], mudname[MAX_INPUT_LENGTH]; struct descriptor_data *d; int i; one_argument(argument, mudname); if ((i=matchmud(mudname))!=UNDEFINED) { argument = one_argument(argument, mudname); if ((i=getmud(ch, mudname, TRUE))==UNDEFINED) return; }; while(isspace(*argument)) argument++; if (!*argument) { msg("Sure you have something to think!", ch); return; }; if (!dimd_credit(ch, 1+1*(i==UNDEFINED))) return; if (i!=UNDEFINED) { if (IS_SET(muds[i].flags, DD_NOTHINK)) { msg("They are no longer listening to remote thinks.", ch); return; }; sprintf(buf, "^%s^%s^%d^*^%s\n\r", PER(ch), GET_KEYNAME(ch), GetMaxLevel(ch), argument); write_to_descriptor(muds[i].desc, buf); } else { sprintf(buf, "^%s^%s^%d^*g^%s\n\r", PER(ch), GET_KEYNAME(ch), GetMaxLevel(ch), argument); for(i=0; muds[i].address; i++) if (IS_SET(muds[i].flags, DD_VERIFIED) && !IS_SET(muds[i].flags, DD_NOTHINK)) write_to_descriptor(muds[i].desc, buf); #if USE_COLOR sprintf(buf, "$kW$n $kLdimension thinks, '%s'", argument); #else sprintf(buf, "$n dimension thinks, '%s'", argument); #endif for(d = descriptor_list; d; d = d->next) if (!d->connected && d->character != ch && GetMaxLevel(d->character) >= DEMIGOD) cact(buf, FALSE, ch, 0, d->character, TO_VICT, CLR_THINK); }; }
void do_dtell(struct char_data *ch, char *argument, int cmd) { char name[MAX_INPUT_LENGTH], mudname[MAX_INPUT_LENGTH], buf[MAX_STRING_LENGTH]; int i; /* for (i=0;i<MAX_MOBOBJ;i++) { sprintf(buf,"%s has pos %d",mob_index[i].name, mob_index[i].pos); slog(buf); }*/ argument = one_argument(argument, name); argument = one_argument(argument, mudname); if ((i=getmud(ch, mudname, TRUE))==UNDEFINED) return; while(isspace(*argument)) argument++; if (!*argument) { msg("Surely you have SOMETHING to say ... ?", ch); return; }; if (!dimd_credit(ch, 1)) return; sprintf(buf, "^%s^%s^%d^t^%s^%s\n\r", PER(ch), GET_KEYNAME(ch), GetMaxLevel(ch), name, argument); write_to_descriptor(muds[i].desc, buf); }
void RuntimeRecordClass::logPrint() const { LOG << "Events: " << events << " Layers: " << layers << " LayerTriplets: " << layerTriplets << " Hits: " << hits << " Loaded tracks: " << tracks << std::endl; LOG << "Measurements: " << records.size() << std::endl; tIOInfo totalIOMean = writeMean + readMean; tIOInfo totalIOVar = writeVar + readVar; LOG << "Total IO: " << totalIOMean.prettyPrint(toVar(totalIOVar)) << std::endl; VLOG << "Read: " << readMean.prettyPrint(toVar(readVar)) << std::endl; VLOG << "Write: " << writeMean.prettyPrint(toVar(writeVar)) << std::endl; tRuntimeInfo totalRuntimeMean = buildGridMean + pairGenMean + tripletPredictMean + tripletFilterMean; tRuntimeInfo totalRuntimeVar = buildGridVar + pairGenVar + tripletPredictVar + tripletFilterVar; LOG << "Total runtime: "; LOG << totalRuntimeMean.prettyPrint(toVar(totalRuntimeVar)) << std::endl; LOG << "Wall time -- per event: " << Utils::nsToMs(totalRuntimeMean.walltime PER events) << " ms" << " -- per layerTriplet: " << Utils::nsToMs(totalRuntimeMean.walltime PER (events*layerTriplets)) << " ms" << " -- per track: " << Utils::nsToMs(totalRuntimeMean.walltime PER tracks) << " ms" << std::endl; VLOG << std::endl << "Grid building: "; VLOG << buildGridMean.prettyPrint(toVar(buildGridVar)) << std::endl; VLOG << "Wall time -- per event: " << Utils::nsToMs(buildGridMean.walltime PER events) << " ms" << " -- per layer " << Utils::nsToMs(buildGridMean.walltime PER (events*layers)) << " ms" << " -- per hit: " << Utils::nsToMs(buildGridMean.walltime PER hits) << " ms" << std::endl; VLOG << std::endl << "Pair generation: "; VLOG << pairGenMean.prettyPrint(toVar(pairGenVar)) << std::endl; VLOG << "Wall time -- per event: " << Utils::nsToMs(pairGenMean.walltime PER events) << " ms" << " -- per layerTriplet " << Utils::nsToMs(pairGenMean.walltime PER (events*layerTriplets)) << " ms" << " -- per track: " << Utils::nsToMs(pairGenMean.walltime PER tracks) << " ms" << std::endl; VLOG << std::endl << "Triplet prediction: "; VLOG << tripletPredictMean.prettyPrint(toVar(tripletPredictVar)) << std::endl; VLOG << "Wall time -- per event: " << Utils::nsToMs(tripletPredictMean.walltime PER events) << " ms" << " -- per layerTriplet " << Utils::nsToMs(tripletPredictMean.walltime PER (events*layerTriplets)) << " ms" << " -- per track: " << Utils::nsToMs(tripletPredictMean.walltime PER tracks) << " ms" << std::endl; VLOG << std::endl << "Triplet filtering: "; VLOG << tripletFilterMean.prettyPrint(toVar(tripletFilterVar)) << std::endl; VLOG << "Wall time -- per event: " << Utils::nsToMs(tripletFilterMean.walltime PER events) << " ms" << " -- per layerTriplet " << Utils::nsToMs(tripletFilterMean.walltime PER (events*layerTriplets)) << " ms" << " -- per track: " << Utils::nsToMs(tripletFilterMean.walltime PER tracks) << " ms" << std::endl; }
void RuntimeRecord::logPrint() const { LOG << "Events: " << events << " Layers: " << layers << " LayerTriplets: " << layerTriplets << " Hits: " << hits << " Loaded tracks: " << tracks <<std::endl; tIOInfo totalIO = write + read; LOG << "Total IO: " << totalIO.prettyPrint() << std::endl; VLOG << "Read: " << read.prettyPrint() << std::endl; VLOG << "Write: " << write.prettyPrint() << std::endl; tRuntimeInfo totalRuntime = buildGrid + pairGen + tripletPredict + tripletFilter; LOG << "Total runtime: "; LOG << totalRuntime.prettyPrint() << std::endl; LOG << "Wall time -- per event: " << Utils::nsToMs(totalRuntime.walltime PER events) << " ms" << " -- per layerTriplet: " << Utils::nsToMs(totalRuntime.walltime PER (events*layerTriplets)) << " ms" << " -- per track: " << Utils::nsToMs(totalRuntime.walltime PER tracks) << " ms" << std::endl; VLOG << std::endl << "Grid building: "; VLOG << buildGrid.prettyPrint() << std::endl; VLOG << "Wall time -- per event: " << Utils::nsToMs(buildGrid.walltime PER events) << " ms" << " -- per layer " << Utils::nsToMs(buildGrid.walltime PER (events*layers)) << " ms" << " -- per hit: " << Utils::nsToMs(buildGrid.walltime PER hits) << " ms" << std::endl; VLOG << std::endl << "Pair generation: "; VLOG << pairGen.prettyPrint() << std::endl; VLOG << "Wall time -- per event: " << Utils::nsToMs(pairGen.walltime PER events) << " ms" << " -- per layerTriplet " << Utils::nsToMs(pairGen.walltime PER (events*layerTriplets)) << " ms" << " -- per track: " << Utils::nsToMs(pairGen.walltime PER tracks) << " ms" << std::endl; VLOG << std::endl << "Triplet prediction: "; VLOG << tripletPredict.prettyPrint() << std::endl; VLOG << "Wall time -- per event: " << Utils::nsToMs(tripletPredict.walltime PER events) << " ms" << " -- per layerTriplet " << Utils::nsToMs(tripletPredict.walltime PER (events*layerTriplets)) << " ms" << " -- per track: " << Utils::nsToMs(tripletPredict.walltime PER tracks) << " ms" << std::endl; VLOG << std::endl << "Triplet filtering: "; VLOG << tripletFilter.prettyPrint() << std::endl; VLOG << "Wall time -- per event: " << Utils::nsToMs(tripletFilter.walltime PER events) << " ms" << " -- per layerTriplet " << Utils::nsToMs(tripletFilter.walltime PER (events*layerTriplets)) << " ms" << " -- per track: " << Utils::nsToMs(tripletFilter.walltime PER tracks) << " ms" << std::endl; }
void do_drestrict(struct char_data *ch, char *argument, int cmd) { char buf[MAX_INPUT_LENGTH]; int i, mud; if (IS_SET(ch->pc->plr, PLR_NODIMD)) { msg("Your DIMD privileges were taken away!", ch); return; }; argument = one_argument(argument, buf); if ((mud=getmud(ch, buf, FALSE))==UNDEFINED) return; while(isspace(*argument)) argument++; if (is_abbrev(argument, "refuse")) { SET_BIT(muds[mud].flags, DD_REFUSE); sprintf(buf, "Now refusing new connections with %s.", muds[mud].formalname); msg(buf, ch); DIMDLOG(buf); return; }; if (is_abbrev(argument, "accept")) { REMOVE_BIT(muds[mud].flags, DD_REFUSE); sprintf(buf, "Now accepting new connections with %s.", muds[mud].formalname); msg(buf, ch); DIMDLOG(buf); return; }; i = atoi(argument); muds[mud].min_level = i; sprintf(buf, "Setting %s's DIMD incoming level to %d.", muds[mud].formalname, i); msg(buf, ch); sprintf(buf, "%s set %s's DIMD incoming level to %d.", PER(ch), muds[mud].formalname, i); DIMDLOG(buf); }
void do_dwho(struct char_data *ch, char *argument, int cmd) { char buf[MAX_INPUT_LENGTH]; int i; argument = one_argument(argument, buf); if ((i=getmud(ch, buf, TRUE))==UNDEFINED) return; if (!dimd_credit(ch, 2)) return; while(isspace(*argument)) argument++; sprintf(buf, "^%s^%s^%d^w^%s\n\r", PER(ch), GET_KEYNAME(ch), GetMaxLevel(ch), argument); write_to_descriptor(muds[i].desc, buf); }
void dimd_loop(void) { int i, fromlevel, fromgodlevel; fd_set input_set, output_set, exc_set; static char buf[MAX_STRING_LENGTH], extra[MAX_STRING_LENGTH], fromname[MAX_INPUT_LENGTH], fromkeyname[MAX_INPUT_LENGTH], dcommand[MAX_INPUT_LENGTH], toname[MAX_INPUT_LENGTH], *scan; struct char_data *vict; char comm[MAX_INPUT_LENGTH]; struct timeval null_time; struct descriptor_data *d; switch (dimd_state) { /****************************************************************/ case DIMD_OPENING: if ((dimd_local_mud=getlocalmud())==UNDEFINED) { DIMDLOG("Couldn't figure out what this mud's name is! DIMD NOT opened."); dimd_state = DIMD_CLOSED; dimd_on = FALSE; return; }; dimd_port = DIMD_PORT; dimd_s=init_socket(dimd_port); DIMDLOG("DIMD port opened."); for(i=0; muds[i].address; i++) if (IS_SET(muds[i].flags, DD_AUTOTRY)) call_a_mud(i); dimd_state = DIMD_OPEN; break; /****************************************************************/ case DIMD_OPEN: null_time.tv_sec = 0; null_time.tv_usec = 0; FD_ZERO(&input_set); FD_ZERO(&output_set); FD_ZERO(&exc_set); FD_SET(dimd_s, &input_set); for(i=0; muds[i].address; i++) if (IS_SET(muds[i].flags, DD_CONNECTED)) { FD_SET(muds[i].desc, &input_set); FD_SET(muds[i].desc, &exc_set); FD_SET(muds[i].desc, &output_set); }; if (select(maxdesc + 1, &input_set, &output_set, &exc_set, &null_time) < 0) { perror("Tell select poll"); return; }; /* Respond to whatever might be happening */ /* New connection? */ if (FD_ISSET(dimd_s, &input_set)) if (!answer_a_mud()) perror("New connection"); for(i=0; muds[i].address; i++) if (IS_SET(muds[i].flags, DD_CONNECTED)) { if (FD_ISSET(muds[i].desc, &exc_set)) { FD_CLR(muds[i].desc, &input_set); FD_CLR(muds[i].desc, &output_set); hangup_on_a_mud(i); }; }; for(i=0; muds[i].address; i++) if (IS_SET(muds[i].flags, DD_CONNECTED)) { if (FD_ISSET(muds[i].desc, &input_set)) if (process_dimd_input(i) < 0) hangup_on_a_mud(i); }; for(i=0; muds[i].address; i++) if (IS_SET(muds[i].flags, DD_CONNECTED)) { while(get_from_q(&muds[i].input, comm)) { if (!IS_SET(muds[i].flags, DD_VERIFIED)) { if (str_cmp(comm, DIMD_PASSWORD)) { sprintf(buf, "The mud is located at port %d.\n\r", dimd_port-2); write_to_descriptor(muds[i].desc, buf); sprintf(buf, "%s[%s]'s server didn't know our password.", muds[i].formalname, muds[i].host); DIMDLOG(buf); hangup_on_a_mud(i); break; }; SET_BIT(muds[i].flags, DD_VERIFIED); break; }; if (*comm != '^') { if (!(vict=get_char(muds[i].pcname))) { sprintf(buf, "DIMD stream for unknown player %s rejected.", muds[i].pcname); DIMDLOG(buf); DIMDLOG(comm); } else msg(comm, vict); continue; }; scan = comm+1; scan = one_dimd_argument(scan, fromname); scan = one_dimd_argument(scan, fromkeyname); scan = one_dimd_argument(scan, buf); fromlevel = atoi(buf); if (!*fromname || !*fromkeyname || !fromlevel) { write_to_descriptor(muds[i].desc, "Your server isn't working properly."); sprintf(buf, "%s[%s] didn't supply PC names or level.", muds[i].formalname, muds[i].host); DIMDLOG(buf); hangup_on_a_mud(i); break; }; if (fromlevel < muds[i].min_level) sprintf(buf, "You must be at least %d level to use DIMD on %s.", muds[i].min_level, muds[i].formalname); else { fromgodlevel = (fromlevel-muds[i].immort_level) * muds[i].immort_level_mult; scan = one_lc_dimd_argument(scan, dcommand); switch(*dcommand) { case '#': strcpy(muds[i].pcname, fromkeyname); continue; case 'a': switch(*(dcommand+1)) { case 'g': sprintf(buf, "%s is now accepting remote gossips.", muds[i].formalname); REMOVE_BIT(muds[i].flags, DD_NOGOSSIP); break; case 'm': sprintf(buf, "%s is now accepting remote muses.", muds[i].formalname); REMOVE_BIT(muds[i].flags, DD_NOMUSE); break; case 't': sprintf(buf, "%s is now accepting remote thinks.", muds[i].formalname); REMOVE_BIT(muds[i].flags, DD_NOTHINK); break; default: sprintf(buf, "Unknown accept command from %s.", muds[i].formalname); }; DIMDLOG(buf); continue; case 'r': switch(*(dcommand+1)) { case 'g': sprintf(buf, "%s is now refusing remote gossips.", muds[i].formalname); SET_BIT(muds[i].flags, DD_NOGOSSIP); break; case 'm': sprintf(buf, "%s is now refusing remote muses.", muds[i].formalname); SET_BIT(muds[i].flags, DD_NOMUSE); break; case 't': sprintf(buf, "%s is now refusing remote thinks.", muds[i].formalname); SET_BIT(muds[i].flags, DD_NOTHINK); break; default: sprintf(buf, "Unknown refuse command from %s.", muds[i].formalname); }; DIMDLOG(buf); continue; case 'w': sprintf(buf, "Who request from %s at %s served.", fromname, muds[i].formalname); DIMDLOG(buf); /* construct_who_list(buf, 39, NULL, fromgodlevel, scan); */ break; case 't': scan = one_lc_dimd_argument(scan, toname); while(isspace(*scan)) scan++; if (!(vict = get_char(toname)) || !dimd_can_see(fromgodlevel, vict)) strcpy(buf, "No char by that name."); else { #if USE_COLOR sprintf(buf, "$kW%s $kMfrom $kW%s $kMtells you '%s'.", fromname, muds[i].formalname, scan); #else sprintf(buf, "%s from %s tells you '%s'.", fromname, muds[i].formalname, scan); #endif cmsg(buf, vict, CLR_TELL); if (IS_SET(vict->pc->comm, COMM_AFK)) #if USE_COLOR sprintf(buf, "$kMYou tell $kW%s$kM (who is AFK), '%s'", PER(vict), scan); #else sprintf(buf, "You tell %s (who is AFK), '%s'", PER(vict), scan); #endif else #if USE_COLOR sprintf(buf, "$kMYou tell $kW%s$kM, '%s'", PER(vict), scan); #else sprintf(buf, "You tell %s, '%s'", PER(vict), scan); #endif }; break; case 'g': if (!dimd_gossip) { write_to_descriptor(muds[i].desc, "^DIMD^DIMD^110^rg\n\r"); sprintf(buf, "%s is no longer accepting remote gossips.", muds[dimd_local_mud].formalname); break; }; if (*(dcommand+1)=='g') #if USE_COLOR sprintf(buf, "$kW%s $kYfrom $kW%s $kYdimension gossips, '%s'", fromname, muds[i].formalname, scan); #else sprintf(buf, "%s from %s dimension gossips, '%s'", fromname, muds[i].formalname, scan); #endif else #if USE_COLOR sprintf(buf, "$kW%s $kYfrom $kW%s $kYgossips, '%s'", fromname, muds[i].formalname, scan); #else sprintf(buf, "%s from %s gossips, '%s'", fromname, muds[i].formalname, scan); #endif for(d = descriptor_list; d; d = d->next) if (!d->connected && !IS_SET(d->character->pc->comm, COMM_NOGOSSIP) && !check_soundproof(d->character)) cmsg(buf, d->character, CLR_GOSSIP); #if USE_COLOR sprintf(buf, "$kYYou gossip on $kW%s$kY, '%s'", muds[dimd_local_mud].formalname, scan); #else sprintf(buf, "You gossip on %s, '%s'", muds[dimd_local_mud].formalname, scan); #endif break; case 'm': if (!dimd_muse) { write_to_descriptor(muds[i].desc, "^DIMD^DIMD^110^rm\n\r"); sprintf(buf, "%s is no longer accepting remote muses.", muds[dimd_local_mud].formalname); break; }; if (*(dcommand+1)=='g') #if USE_COLOR sprintf(buf, "$kW%s $kLfrom $kW%s $kLdimension muses, '%s'", fromname, muds[i].formalname, scan); #else sprintf(buf, "%s from %s dimension muses, '%s'", fromname, muds[i].formalname, scan); #endif else #if USE_COLOR sprintf(buf, "$kW%s $kLfrom $kW%s $kLmuses, '%s'", fromname, muds[i].formalname, scan); #else sprintf(buf, "%s from %s muses, '%s'", fromname, muds[i].formalname, scan); #endif for(d = descriptor_list; d; d = d->next) if (!d->connected && GetMaxLevel(d->character) >= LOW_IMMORTAL && !IS_SET(d->character->pc->comm, COMM_NOMUSE)) cmsg(buf, d->character, CLR_MUSE); #if USE_COLOR sprintf(buf, "$kLYou muse on $kW%s$kL, '%s'", muds[dimd_local_mud].formalname, scan); #else sprintf(buf, "You muse on %s, '%s'", muds[dimd_local_mud].formalname, scan); #endif break; case '*': if (!dimd_think) { write_to_descriptor(muds[i].desc, "^DIMD^DIMD^110^rt\n\r"); sprintf(buf, "%s is no longer accepting remote thinks.", muds[dimd_local_mud].formalname); break; }; if (*(dcommand+1)=='g') #if USE_COLOR sprintf(buf, "$kW%s $kLfrom $kW%s $kLdimension thinks, '%s'", fromname, muds[i].formalname, scan); #else sprintf(buf, "%s from %s dimension thinks, '%s'", fromname, muds[i].formalname, scan); #endif else #if USE_COLOR sprintf(buf, "$kW%s $kLfrom $kW%s $kLthinks, '%s'", fromname, muds[i].formalname, scan); #else sprintf(buf, "%s from %s thinks, '%s'", fromname, muds[i].formalname, scan); #endif for(d = descriptor_list; d; d = d->next) if (!d->connected && GetMaxLevel(d->character) >= DEMIGOD && !IS_SET(d->character->pc->comm, COMM_NOMUSE)) cmsg(buf, d->character, CLR_THINK); #if USE_COLOR sprintf(buf, "$kLYou think on $kW%s$kL, '%s'", muds[dimd_local_mud].formalname, scan); #else sprintf(buf, "You think on %s, '%s'", muds[dimd_local_mud].formalname, scan); #endif break; default: #if USE_COLOR sprintf(buf, "$kW%s $kRfrom $kW%s $kRissued invalid command '%s'.", fromname, muds[i].formalname, dcommand); #else sprintf(buf, "%s from %s issued invalid command '%s'.", fromname, muds[i].formalname, dcommand); #endif DIMDLOG(buf); #if USE_COLOR strcpy(buf, "$k+BRYour server isn't functioning properly."); #else strcpy(buf, "Your server isn't functioning properly."); #endif }; };
void do_dmuse(struct char_data *ch, char *argument, int cmd) { char buf[MAX_INPUT_LENGTH], mudname[MAX_INPUT_LENGTH]; struct descriptor_data *d; int i; if (IS_SET(ch->specials.act, PLR_NOSHOUT)) { msg("The gods are sick of listen to you! You've been gagged!", ch); return; }; if (HUMAN(ch) && IS_SET(ch->pc->comm, COMM_NOMUSE)) { msg("You are not tuned into the muse channel!", ch); return; }; one_argument(argument, mudname); if ((i=matchmud(mudname))!=UNDEFINED) { argument = one_argument(argument, mudname); if ((i=getmud(ch, mudname, TRUE))==UNDEFINED) return; }; while(isspace(*argument)) argument++; if (!*argument) { msg("Sure you have something to muse!", ch); return; }; if (!dimd_credit(ch, 1+2*(i==UNDEFINED))) return; if (i!=UNDEFINED) { if (IS_SET(muds[i].flags, DD_NOMUSE)) { msg("They are no longer listening to remote muses.", ch); return; }; sprintf(buf, "^%s^%s^%d^mg^%s\n\r", PER(ch), GET_KEYNAME(ch), GetMaxLevel(ch), argument); write_to_descriptor(muds[i].desc, buf); } else { sprintf(buf, "^%s^%s^%d^mg^%s\n\r", PER(ch), GET_KEYNAME(ch), GetMaxLevel(ch), argument); for(i=0; muds[i].address; i++) if (IS_SET(muds[i].flags, DD_VERIFIED) && !IS_SET(muds[i].flags, DD_NOMUSE)) write_to_descriptor(muds[i].desc, buf); #if USE_COLOR sprintf(buf, "$kW$n $kLdimension muses, '%s'", argument); #else sprintf(buf, "$n dimension muses, '%s'", argument); #endif for(d = descriptor_list; d; d = d->next) if (!d->connected && d->character != ch && GetMaxLevel(d->character) >= LOW_IMMORTAL && !IS_SET(d->character->pc->comm, COMM_NOMUSE)) cact(buf, FALSE, ch, 0, d->character, TO_VICT, CLR_MUSE); }; }
void do_dgossip(struct char_data *ch, char *argument, int cmd) { char buf[MAX_INPUT_LENGTH], mudname[MAX_INPUT_LENGTH]; struct descriptor_data *d; int i; if (IS_SET(ch->specials.act, PLR_NOSHOUT)) { msg("Ummm, no one can hear you through that gag!", ch); return; }; if (IS_SET(ch->specials.act, PLR_NOGOSSIP)) { msg("You are not tuned into the gossip channel!", ch); return; }; one_argument(argument, mudname); if ((i=matchmud(mudname))!=UNDEFINED) { argument = one_argument(argument, mudname); if ((i=getmud(ch, mudname, TRUE))==UNDEFINED) return; }; while(isspace(*argument)) argument++; if (!*argument) { msg("Surely you have something to gossip!", ch); return; }; if (!dimd_credit(ch, 2+3*(i==UNDEFINED))) return; if (i!=UNDEFINED) { if (IS_SET(muds[i].flags, DD_NOGOSSIP)) { msg("They are no longer listening to remote gossips.", ch); return; }; sprintf(buf, "^%s^%s^%d^g^%s\n\r", PER(ch), GET_KEYNAME(ch), GetMaxLevel(ch), argument); write_to_descriptor(muds[i].desc, buf); } else { sprintf(buf, "^%s^%s^%d^gg^%s\n\r", PER(ch), GET_KEYNAME(ch), GetMaxLevel(ch), argument); for(i=0; muds[i].address; i++) if (IS_SET(muds[i].flags, DD_VERIFIED) && !IS_SET(muds[i].flags, DD_NOGOSSIP)) write_to_descriptor(muds[i].desc, buf); #if USE_COLOR sprintf(buf, "$kW$n $kmdimension gossips, '%s'", argument); #else sprintf(buf, "$n dimension gossips, '%s'", argument); #endif for(d = descriptor_list; d; d = d->next) if (!d->connected && d->character != ch && !IS_SET(d->character->pc->comm, COMM_NOGOSSIP) && !check_soundproof(d->character)) cact(buf, FALSE, ch, 0, d->character, TO_VICT, CLR_GOSSIP); }; }