tmi2_fluffos_v2/
tmi2_fluffos_v2/bin/
tmi2_fluffos_v2/etc/
tmi2_fluffos_v2/fluffos-2.7-ds2.018/
tmi2_fluffos_v2/fluffos-2.7-ds2.018/ChangeLog.old/
tmi2_fluffos_v2/fluffos-2.7-ds2.018/Win32/
tmi2_fluffos_v2/fluffos-2.7-ds2.018/compat/
tmi2_fluffos_v2/fluffos-2.7-ds2.018/compat/simuls/
tmi2_fluffos_v2/fluffos-2.7-ds2.018/include/
tmi2_fluffos_v2/fluffos-2.7-ds2.018/testsuite/
tmi2_fluffos_v2/fluffos-2.7-ds2.018/testsuite/clone/
tmi2_fluffos_v2/fluffos-2.7-ds2.018/testsuite/command/
tmi2_fluffos_v2/fluffos-2.7-ds2.018/testsuite/data/
tmi2_fluffos_v2/fluffos-2.7-ds2.018/testsuite/etc/
tmi2_fluffos_v2/fluffos-2.7-ds2.018/testsuite/include/
tmi2_fluffos_v2/fluffos-2.7-ds2.018/testsuite/inherit/
tmi2_fluffos_v2/fluffos-2.7-ds2.018/testsuite/inherit/master/
tmi2_fluffos_v2/fluffos-2.7-ds2.018/testsuite/log/
tmi2_fluffos_v2/fluffos-2.7-ds2.018/testsuite/single/
tmi2_fluffos_v2/fluffos-2.7-ds2.018/testsuite/single/tests/compiler/
tmi2_fluffos_v2/fluffos-2.7-ds2.018/testsuite/single/tests/efuns/
tmi2_fluffos_v2/fluffos-2.7-ds2.018/testsuite/single/tests/operators/
tmi2_fluffos_v2/fluffos-2.7-ds2.018/testsuite/u/
tmi2_fluffos_v2/fluffos-2.7-ds2.018/tmp/
tmi2_fluffos_v2/fluffos-2.7-ds2.018/windows/
tmi2_fluffos_v2/lib/
tmi2_fluffos_v2/lib/adm/
tmi2_fluffos_v2/lib/adm/daemons/languages/
tmi2_fluffos_v2/lib/adm/daemons/network/I3/
tmi2_fluffos_v2/lib/adm/daemons/virtual/
tmi2_fluffos_v2/lib/adm/daemons/virtual/template/
tmi2_fluffos_v2/lib/adm/news/
tmi2_fluffos_v2/lib/adm/obj/
tmi2_fluffos_v2/lib/adm/obj/master/
tmi2_fluffos_v2/lib/adm/priv/
tmi2_fluffos_v2/lib/adm/shell/
tmi2_fluffos_v2/lib/adm/tmp/
tmi2_fluffos_v2/lib/cmds/
tmi2_fluffos_v2/lib/d/
tmi2_fluffos_v2/lib/d/Conf/
tmi2_fluffos_v2/lib/d/Conf/adm/
tmi2_fluffos_v2/lib/d/Conf/boards/
tmi2_fluffos_v2/lib/d/Conf/cmds/
tmi2_fluffos_v2/lib/d/Conf/data/
tmi2_fluffos_v2/lib/d/Conf/logs/
tmi2_fluffos_v2/lib/d/Conf/obj/
tmi2_fluffos_v2/lib/d/Conf/text/help/
tmi2_fluffos_v2/lib/d/Fooland/adm/
tmi2_fluffos_v2/lib/d/Fooland/data/
tmi2_fluffos_v2/lib/d/Fooland/data/attic/
tmi2_fluffos_v2/lib/d/Fooland/items/
tmi2_fluffos_v2/lib/d/TMI/
tmi2_fluffos_v2/lib/d/TMI/adm/
tmi2_fluffos_v2/lib/d/TMI/boards/
tmi2_fluffos_v2/lib/d/TMI/data/
tmi2_fluffos_v2/lib/d/TMI/rooms/
tmi2_fluffos_v2/lib/d/grid/
tmi2_fluffos_v2/lib/d/grid/adm/
tmi2_fluffos_v2/lib/d/grid/data/
tmi2_fluffos_v2/lib/d/std/
tmi2_fluffos_v2/lib/d/std/adm/
tmi2_fluffos_v2/lib/data/adm/
tmi2_fluffos_v2/lib/data/adm/daemons/
tmi2_fluffos_v2/lib/data/adm/daemons/doc_d/
tmi2_fluffos_v2/lib/data/adm/daemons/emoted/
tmi2_fluffos_v2/lib/data/adm/daemons/network/http/
tmi2_fluffos_v2/lib/data/adm/daemons/network/services/mail_q/
tmi2_fluffos_v2/lib/data/adm/daemons/network/smtp/
tmi2_fluffos_v2/lib/data/adm/daemons/news/archives/
tmi2_fluffos_v2/lib/data/attic/connection/
tmi2_fluffos_v2/lib/data/attic/user/
tmi2_fluffos_v2/lib/data/std/connection/b/
tmi2_fluffos_v2/lib/data/std/connection/l/
tmi2_fluffos_v2/lib/data/std/user/a/
tmi2_fluffos_v2/lib/data/std/user/b/
tmi2_fluffos_v2/lib/data/std/user/d/
tmi2_fluffos_v2/lib/data/std/user/f/
tmi2_fluffos_v2/lib/data/std/user/l/
tmi2_fluffos_v2/lib/data/std/user/x/
tmi2_fluffos_v2/lib/data/u/d/dm/working/doc_d/
tmi2_fluffos_v2/lib/data/u/l/leto/doc_d/
tmi2_fluffos_v2/lib/data/u/l/leto/smtp/
tmi2_fluffos_v2/lib/doc/
tmi2_fluffos_v2/lib/doc/driverdoc/applies/
tmi2_fluffos_v2/lib/doc/driverdoc/applies/interactive/
tmi2_fluffos_v2/lib/doc/driverdoc/concepts/
tmi2_fluffos_v2/lib/doc/driverdoc/driver/
tmi2_fluffos_v2/lib/doc/driverdoc/efuns/arrays/
tmi2_fluffos_v2/lib/doc/driverdoc/efuns/buffers/
tmi2_fluffos_v2/lib/doc/driverdoc/efuns/compile/
tmi2_fluffos_v2/lib/doc/driverdoc/efuns/ed/
tmi2_fluffos_v2/lib/doc/driverdoc/efuns/filesystem/
tmi2_fluffos_v2/lib/doc/driverdoc/efuns/floats/
tmi2_fluffos_v2/lib/doc/driverdoc/efuns/functions/
tmi2_fluffos_v2/lib/doc/driverdoc/efuns/general/
tmi2_fluffos_v2/lib/doc/driverdoc/efuns/mappings/
tmi2_fluffos_v2/lib/doc/driverdoc/efuns/numbers/
tmi2_fluffos_v2/lib/doc/driverdoc/efuns/parsing/
tmi2_fluffos_v2/lib/doc/driverdoc/lpc/constructs/
tmi2_fluffos_v2/lib/doc/driverdoc/lpc/preprocessor/
tmi2_fluffos_v2/lib/doc/driverdoc/lpc/types/
tmi2_fluffos_v2/lib/doc/driverdoc/platforms/
tmi2_fluffos_v2/lib/doc/mudlib/
tmi2_fluffos_v2/lib/ftp/
tmi2_fluffos_v2/lib/include/driver/
tmi2_fluffos_v2/lib/log/
tmi2_fluffos_v2/lib/log/driver/
tmi2_fluffos_v2/lib/obj/net/
tmi2_fluffos_v2/lib/obj/shells/
tmi2_fluffos_v2/lib/obj/tools/
tmi2_fluffos_v2/lib/std/adt/
tmi2_fluffos_v2/lib/std/board/
tmi2_fluffos_v2/lib/std/body/
tmi2_fluffos_v2/lib/std/fun/
tmi2_fluffos_v2/lib/std/living/
tmi2_fluffos_v2/lib/std/object/
tmi2_fluffos_v2/lib/std/shop/
tmi2_fluffos_v2/lib/std/socket/
tmi2_fluffos_v2/lib/std/user/
tmi2_fluffos_v2/lib/std/virtual/
tmi2_fluffos_v2/lib/student/
tmi2_fluffos_v2/lib/student/kalypso/
tmi2_fluffos_v2/lib/student/kalypso/armor/
tmi2_fluffos_v2/lib/student/kalypso/rooms/
tmi2_fluffos_v2/lib/student/kalypso/weapons/
tmi2_fluffos_v2/lib/u/l/leto/
tmi2_fluffos_v2/lib/u/l/leto/cmds/
tmi2_fluffos_v2/lib/www/errors/
tmi2_fluffos_v2/lib/www/gateways/
tmi2_fluffos_v2/lib/www/images/
tmi2_fluffos_v2/old/
tmi2_fluffos_v2/win32/
 
// Him messed abit with it, in the early days
//
// Updated interwiz tells at some point by Leto@Earth
// Cleaned it up a bit and added busy flag Leto@Earth 24/12/93
// Completely overhauled and updated by Leto@Earth 14-jan-94 
// (fixed idlemsg, busy, new remote tell)
// Highlighting experiment added by Vagabond@Earth 19-jan-94
// Ignore code added by Leto@Earth 26-feb-94
// Another major clean_up of code, added wrap() everywhere
//  Wiped ansi stuff again and moved it to user.c
//    Leto (29.04.94)
 //   Leto added notify for break through busy for admins ;)

// Euh, this isn't the real Tmi-2 tell, but it works :)
// It's not using any tell daemons, but has all functionality
// within the cmd. 
// moved here on 3 nov 95 (5 minutes after i made the pre1 tar :)
// Leto
// 03/10/96 fixed visibility check Leto@Earth
// 03/10/96 later that day, Leto@Earth fixed muds with spaces in name

#include <net/daemons.h>
#include <daemons.h>
#include <mudlib.h>
#include <ansi.h>
#include <net/i3.h>

inherit DAEMON;

#define SYNTAX  "Usage: tell name <@mud> [message]\n"

#define NH " is not on "+MUD_NAME+"."
 
int cmd_tell(string str) {
    string tell_msg, who, msg, target, mud;
     int idlem, idles;
     string idlemsg;
		 string *ignore;
    object ob, act_ob;
    
    act_ob = this_player();
    
    if( !str || sscanf( str, "%s %s", who, msg ) != 2 ) {
       notify_fail( SYNTAX );
       return 0;  }
    
    notify_fail( capitalize(who) + NH + "\n" );
 
    if(sscanf(who, "%s@%s", target, mud) == 2) {
mud = replace_string(mud,"."," ");
    "/adm/daemons/network/I3/tell"->send_tell(this_player()->query("name"), this_player()->query("cap_name"), mud, target, msg);
       return 1;  }
 
    who = lower_case( who );
  ob = find_player(who);
 
  if ( (!ob) || !visible(ob,this_player()) ) {
        notify_fail(capitalize(who)+NH+"\n"); //Ok, crude hack, i know :) Leto
        return 0;}

    if(!interactive(ob)) {
         write("That person is currently net-dead, sorry.\n");
        return 1;
       }
    if(ob && ob->query("npc") && who != (string)ob->query("name") &&
       !wizardp(act_ob))  return 0;

    if(ob->query("busy")) 
      {
       if(!member_group(this_player()->query("name"),"admin"))
	{ 
	write(wrap(ob->query("cap_name")+
	" is busy right now, please try again later...\n"));
	return 1;
	}
	write("["+capitalize(who)+" has the busy flag set]\n");
       }

    if(ob == this_player()) 
			{
           message("tell",
           wrap("You tell yourself: "+msg), this_player() );
		   return 1;
			}

    // check ignore, Leto@Earth reinstated it from local ts @tmi-2 
    
		if(!member_group(this_player()->query("name"),"admin")) 
		{
    ignore = ob-> query( "ignore" );
    if( pointerp( ignore ) )
      { 
       if(-1 != member_array( this_player()->query("name"), ignore ))  
				 {
				  write(wrap(ob->query("cap_name")+ " is ignoring you.\n"));
				  return 1;
			   }
       }
     }

    // Do we want an extra idle msg to be added ?
   
		idlem = query_idle(ob) / 60 ;
    if(idlem)
      {
       idles = query_idle(ob) - (idlem * 60);
       idlemsg = (string)ob->query("idlemsg");
       message("tell",wrap(ob->query("cap_name")+" has been idle for "+idlem+
         " minutes and "+idles+ " seconds, ") , this_player() );
       if (!idlemsg) message("tell",wrap("but "+subjective(ob->query("gender"))+
				 " left you no message at all :("), this_player() );
        else message("tell",wrap(possessive(ob->query("gender"))+
				 " idle message is : "+idlemsg), this_player() );
       }
     // Ok, we got our conditions, now do the actual tell.


// Leto: don't like the stuff below, it's ugly !
    if(!ob) 
			{
	     if(ob = find_living(who)) 
				 {
          message("tell",wrap(identify(ob)+" "+identify(this_player())+"\n"),
              this_player() ) ;
	        message("tell",iwrap(act_ob->query("cap_name") + 
		" tells you: " + msg) , ob );
	    message("tell",
             iwrap("You tell "+capitalize(who)+": "+msg) , this_player() );
        	ob->set("reply", act_ob->query("name"));
        	return 1;  
				}
 
     	 return 0; 
	    }
 
    // This is where TMI-2 used to send it to local tell_server 
    //write( TS_D->tell_user(act_ob->query("name"), 0, who, msg) );

      {
      message("tell",
       wrap("You tell "+ob->query("cap_name")+": "+msg+"\n"), this_player() );
      message("tell", iwrap(act_ob->query("cap_name")+
      " tells you: "+ msg+"\n"), ob );
    ob->set("reply", act_ob->query("name"));
      return 1;
   }
}
 

int help() {

write( @HelpText 
Usage: tell name[@mud] <message>

This command allows a user to tell a private message to another player or 
other living creature, no matter where they are located on the mud. It is
also possible to tell users on another mud a message by using the [@mudname] 
addition to the user's name (ie: tell leto@earthmud Hi).
(for muds with spaces in their name, replace the space with a dot, eg:
 tell leto@sodden.earth Hi)

See also: busy, ignore, idlemsg
HelpText
);
return 1;
}