Ejemplo n.º 1
0
int main(object me, string arg)
{
	object ob;
        me=this_player();
	seteuid(geteuid(me));
	if( !arg ) {
	  	if( objectp(ob = query_snooping(me)) )
			write("你现在正在监听" + ob->query("name") + "所收到的讯息。\n");
		return 1;
	} else if( arg=="none" ) {
		if( objectp(ob = query_snooping(me)))
        	message_vision (HIW + "$N停止监听$n所收到的讯息。\n"+ NOR,me,ob);
		snoop(me,);
		write("Ok.\n");
		return 1;
	}

	ob = find_player(arg);
	if (!ob) ob = find_player(arg);
	if(!ob || (!ob->visible(ob))) return notify_fail("没有这个人。\n");
        if (!interactive(ob))
           return notify_fail("不能监听断线中的使用者所收到的讯息。\n");
	if(wizhood(ob)=="(admin)"||wizhood(ob)=="(manager)")
		return notify_fail("你不能窃听大神。\n");
	if( me==ob ) return notify_fail("请用 snoop none 解除监听。\n");
		
	snoop(me, ob);
	if( userp(ob) ) log_file("SNOOP_PLAYER",
		sprintf("%s(%s) snoops %s on %s.\n", me->name(1), geteuid(me), ob->name(1),
			ctime(time()) ) );
	write (HIW"你开始监听"+ob->name()+"所收到的讯息。\n" + NOR);
	tell_object(ob, HIW + me->name(1) + "开始监听你所收到的讯息。\n" + NOR);

	return 1;
}
Ejemplo n.º 2
0
int main(object me, string arg)
{
	object ob, ob1;

	if( !arg ) {
		if( objectp(ob = query_snooping(me)) )
			write("─у╧╓╘┌╒¤╘┌╝р╠¤" + ob->query("name") + "╦∙╩╒╡╜╡─╤╢╧вбг\n");
		else
			write("─у╧╓╘┌▓╗╘┌╝р╠¤╚╬║╬╨┼╧вбг\n");	
		return 1;
	} else if( arg=="none" ) {
		if( objectp(ob = query_snooping(me))
		&&	wiz_level(ob) >= wiz_level(me) )
			tell_object(ob, HIW + me->name(1) + "═г╓╣╝р╠¤─у╦∙╩╒╡╜╡─╤╢╧вбг\n" NOR);
		snoop(me);
		if (objectp(ob))
			write("─у╧╓╘┌═г╓╣╝р╠¤" + ob->query("name") + "╦∙╩╒╡╜╡─╤╢╧вбг\n");
		else
			write("─у╧╓╘┌▓╗╘┌╝р╠¤╚╬║╬╨┼╧вбг\n");
		return 1;
	}

	ob = find_player(arg);
	if(!ob) ob = find_living(arg);
	if(!ob || !me->visible(ob)) return notify_fail("├╗╙╨╒т╕Ў╚╦бг\n");

	if( wizhood(me) != "(admin)"
	&&	wiz_level(me) <= wiz_level(ob) )
		return notify_fail("─у├╗╙╨╝р╠¤" + ob->name() + "╦∙╩╒╠¤╤╢╧в╡─╚и└√бг\n");

	if( me==ob ) return notify_fail("╟ы╙├ snoop none ╜т│¤╝р╠¤бг\n");
	
	if (objectp(ob1=query_snoop(ob)))
		return notify_fail(ob1->name()+"╒¤╘┌╝р╠¤"+ob->name()+"╡─╨┼╧вбг\n");
	
	if (ob->query_temp("netdead",1))
		return notify_fail("┤╦╚╦╒¤┤ж╘┌╢╧╧▀╫┤╠мбг\n");
	
	if (!userp(ob))
		return notify_fail("├╗╖и╟╘╠¤NPC╨┼╧в╡─бг\n");
				
	snoop(me, ob);
	write("─у╧╓╘┌┐к╩╝╟╘╠¤" + ob->name(1) + "╦∙╩╒╡╜╡─╤╢╧вбг\n");
	if( userp(ob) ) log_file("SNOOP_PLAYER",
		sprintf("%s(%s) snoops %s on %s.\n", me->name(1), geteuid(me), ob->name(1),
			ctime(time()) ) );
	if( wizardp(ob) && wizhood(me) != "(admin)")
		tell_object(ob, HIW + me->name(1) + "┐к╩╝╝р╠¤─у╦∙╩╒╡╜╡─╤╢╧вбг\n" + NOR);

	return 1;
}
Ejemplo n.º 3
0
int main(object me, string arg)
{
	object ob;

	if( !arg ) {
		if( objectp(ob = query_snooping(me)) )
			write("你现在正在监听" + ob->query("name") + "所收到的讯息。\n");
		return 1;
	}
	 else if( arg=="-none" ) {
if( objectp(ob = query_snooping(me)) && wizardp(ob) )
			tell_object(ob, HIW + me->name(1) + 
				"停止监听你所收到的讯息。\n" NOR);
		snoop(me);
		write("Ok.\n");
		return 1;
	}
else if(query_snooping(me)) snoop(me);

	ob = find_player(arg);
	if(!ob) ob = find_living(arg);
	
	if(!ob) ob = LOGIN_D->find_body(arg);
	/* added by mon. 2/23/97 */

	if(!ob || !me->visible(ob)) return notify_fail("没有这个人。\n");

	if( wizhood(me) != "(admin)"
	&&	wiz_level(me) <= wiz_level(ob) )
		return notify_fail("你没有监听" + ob->name() + "所收听讯息的权利。\n");

	if( me==ob ) return notify_fail("请用 snoop -none 解除监听。\n");
		
	snoop(me, ob);

	me->set_temp("snoop_encoding",
		(int)me->query_encoding()*10+ob->query_encoding());
	// added by mon 6/1/98

	write("你现在开始窃听" + ob->name(1) + "所收到的讯息。\n");
	if( userp(ob) ) log_file("SNOOP_PLAYER",
		sprintf("%s(%s) snoops %s on %s.\n", me->name(1), geteuid(me), ob->name(1),
			ctime(time()) ) );
// if( wizardp(ob) && wizhood(me) != "(admin)")
if( wizardp(ob)) 
		tell_object(ob, HIW + me->name(1) + "开始监听你所收到的讯息。\n" + NOR);

	return 1;
}
Ejemplo n.º 4
0
Archivo: spsn.c Proyecto: aricxu/xkx100
int main(object me, string arg)
{
	object ob;

	if( !arg ) {
		if( objectp(ob = query_snooping(me)) )
			write("你现在正在监听" + ob->query("name") + "所收到的讯息。\n");
		return 1;
	} else if( arg=="none" ) {
		snoop(me);
		write("Ok.\n");
		return 1;
	}

	ob = find_player(arg);
	if(!ob) ob = find_living(arg);
	if(!ob || !me->visible(ob)) return notify_fail("没有这个人。\n");

	if( me==ob ) return notify_fail("请用 snoop none 解除监听。\n");
		
	snoop(me, ob);
	write("你现在开始窃听" + ob->name(1) + "所收到的讯息。\n");
	if( userp(ob) ) log_file("SNOOP_PLAYER",
		sprintf("%s(%s) snoops %s on %s.\n", me->name(1), geteuid(me), ob->name(1),
			ctime(time()) ) );
	return 1;
}
Ejemplo n.º 5
0
int main(object me, string arg)
{
    object ob;

    if( !arg ) {
        if( objectp(ob = query_snooping(me)) )
            write("你现在正在监听" + ob->query("name") + "所收到的讯息。\n");
        return 1;
    } else if( arg=="none" ) {
        if( objectp(ob = query_snooping(me))
                &&	wiz_level(ob) >= wiz_level(me) )
            tell_object(ob, HIW + me->name(1) + "停止监听你所收到的讯息。\n" NOR);
        snoop(me);
        write("Ok.\n");
        return 1;
    }

    ob = find_player(arg);
    if(!ob) ob = find_living(arg);
    if(!ob || !me->visible(ob)) return notify_fail("没有这个人。\n");

    if( wizhood(me) != "(admin)"
            &&	wiz_level(me) <= wiz_level(ob) )
        return notify_fail("你没有监听" + ob->name() + "所收听讯息的权利。\n");

    if( me==ob ) return notify_fail("请用 snoop none 解除监听。\n");

    snoop(me, ob);
    write("你现在开始窃听" + ob->name(1) + "所收到的讯息。\n");
    if( userp(ob) ) log_file("SNOOP_PLAYER",
                                 sprintf("%s(%s) snoops %s on %s.\n", me->name(1), geteuid(me), ob->name(1),
                                         ctime(time()) ) );
    if( wizardp(ob) && wizhood(me) != "(admin)")
        tell_object(ob, HIW + me->name(1) + "开始监听你所收到的讯息。\n" + NOR);

    return 1;
}
Ejemplo n.º 6
0
void do_tests() {
#ifndef __NO_SNOOP__
    ASSERT(query_snooping(this_object()) == 0);
#endif
}