dsIIr4/bin/
dsIIr4/extra/creremote/
dsIIr4/extra/wolfpaw/
dsIIr4/lib/cmds/admins/
dsIIr4/lib/cmds/common/
dsIIr4/lib/cmds/creators/include/
dsIIr4/lib/cmds/creators/include/SCCS/
dsIIr4/lib/daemon/services/
dsIIr4/lib/doc/
dsIIr4/lib/domains/Ylsrim/
dsIIr4/lib/domains/Ylsrim/adm/
dsIIr4/lib/domains/Ylsrim/armor/
dsIIr4/lib/domains/Ylsrim/broken/
dsIIr4/lib/domains/Ylsrim/fish/
dsIIr4/lib/domains/Ylsrim/meal/
dsIIr4/lib/domains/Ylsrim/npc/
dsIIr4/lib/domains/Ylsrim/virtual/
dsIIr4/lib/domains/Ylsrim/weapon/
dsIIr4/lib/domains/campus/adm/
dsIIr4/lib/domains/campus/etc/
dsIIr4/lib/domains/campus/meals/
dsIIr4/lib/domains/campus/npc/
dsIIr4/lib/domains/campus/save/
dsIIr4/lib/domains/campus/txt/
dsIIr4/lib/domains/campus/txt/ai/charles/
dsIIr4/lib/domains/campus/txt/ai/charles/bak2/
dsIIr4/lib/domains/campus/txt/ai/charles/bak2/bak1/
dsIIr4/lib/domains/campus/txt/ai/charly/
dsIIr4/lib/domains/campus/txt/ai/charly/bak/
dsIIr4/lib/domains/campus/txt/jenny/
dsIIr4/lib/domains/default/creator/
dsIIr4/lib/domains/default/doors/
dsIIr4/lib/domains/default/etc/
dsIIr4/lib/domains/default/virtual/
dsIIr4/lib/domains/default/weap/
dsIIr4/lib/domains/town/virtual/
dsIIr4/lib/lib/comp/
dsIIr4/lib/lib/lvs/
dsIIr4/lib/lib/user/
dsIIr4/lib/lib/virtual/
dsIIr4/lib/log/
dsIIr4/lib/obj/book_source/
dsIIr4/lib/obj/include/
dsIIr4/lib/realms/template/
dsIIr4/lib/realms/template/adm/
dsIIr4/lib/realms/template/area/armor/
dsIIr4/lib/realms/template/area/npc/
dsIIr4/lib/realms/template/area/obj/
dsIIr4/lib/realms/template/area/room/
dsIIr4/lib/realms/template/area/weap/
dsIIr4/lib/realms/template/bak/
dsIIr4/lib/realms/template/cmds/
dsIIr4/lib/save/
dsIIr4/lib/save/kills/o/
dsIIr4/lib/secure/cfg/classes/
dsIIr4/lib/secure/cmds/creators/include/
dsIIr4/lib/secure/cmds/players/
dsIIr4/lib/secure/cmds/players/include/
dsIIr4/lib/secure/daemon/include/
dsIIr4/lib/secure/lib/
dsIIr4/lib/secure/lib/include/
dsIIr4/lib/secure/lib/net/include/
dsIIr4/lib/secure/lib/std/
dsIIr4/lib/secure/modules/
dsIIr4/lib/secure/npc/
dsIIr4/lib/secure/obj/include/
dsIIr4/lib/secure/room/
dsIIr4/lib/secure/save/
dsIIr4/lib/secure/save/boards/
dsIIr4/lib/secure/save/players/g/
dsIIr4/lib/secure/tmp/
dsIIr4/lib/secure/verbs/creators/
dsIIr4/lib/shadows/
dsIIr4/lib/spells/
dsIIr4/lib/std/board/
dsIIr4/lib/std/lib/
dsIIr4/lib/tmp/
dsIIr4/lib/verbs/admins/include/
dsIIr4/lib/verbs/common/
dsIIr4/lib/verbs/common/include/
dsIIr4/lib/verbs/creators/include/
dsIIr4/lib/verbs/players/include/SCCS/
dsIIr4/lib/verbs/rooms/
dsIIr4/lib/verbs/rooms/include/
dsIIr4/lib/www/
dsIIr4/v22.2b14-dsouls2/
dsIIr4/v22.2b14-dsouls2/ChangeLog.old/
dsIIr4/v22.2b14-dsouls2/Win32/
dsIIr4/v22.2b14-dsouls2/compat/
dsIIr4/v22.2b14-dsouls2/compat/simuls/
dsIIr4/v22.2b14-dsouls2/include/
dsIIr4/v22.2b14-dsouls2/mudlib/
dsIIr4/v22.2b14-dsouls2/testsuite/
dsIIr4/v22.2b14-dsouls2/testsuite/clone/
dsIIr4/v22.2b14-dsouls2/testsuite/command/
dsIIr4/v22.2b14-dsouls2/testsuite/data/
dsIIr4/v22.2b14-dsouls2/testsuite/etc/
dsIIr4/v22.2b14-dsouls2/testsuite/include/
dsIIr4/v22.2b14-dsouls2/testsuite/inherit/
dsIIr4/v22.2b14-dsouls2/testsuite/inherit/master/
dsIIr4/v22.2b14-dsouls2/testsuite/log/
dsIIr4/v22.2b14-dsouls2/testsuite/single/
dsIIr4/v22.2b14-dsouls2/testsuite/single/tests/compiler/
dsIIr4/v22.2b14-dsouls2/testsuite/single/tests/efuns/
dsIIr4/v22.2b14-dsouls2/testsuite/single/tests/operators/
dsIIr4/v22.2b14-dsouls2/testsuite/u/
dsIIr4/v22.2b14-dsouls2/tmp/
dsIIr4/win32/
#include <lib.h>

inherit LIB_DAEMON;


static void create() {
    daemon::create();
}

string PirateFilter(string str){
    if(!str || !sizeof(str) || !stringp(str)) return "";
    if(grepp(str,"tp://")) return str;
    if(lower_case(str) == "test") str = "ARRR!";
    if(lower_case(str) == "testing") str = "ARRR, I says!";
    if(lower_case(str) == "testing.") str = "ARRR!";
    if(lower_case(str) == "test.") str = "ARRR!";
    if(lower_case(str) == "hmm") str = "YARR!";
    if(lower_case(str) == "hmmm") str = "YARRR!";
    if(lower_case(str) == "?") str = "YARRR?";
    if(lower_case(str) == "...") str = "Y...A...R...R?";
    str = replace_string(str, "that's", "that be");
    str = replace_string(str, "That's", "That be");
    str = replace_string(str, "they're", "they be");
    str = replace_string(str, "They're", "They be");
    str = replace_string(str, "your ", "yer ");
    str = replace_string(str, " gay ", " hamarseckshul ");
    str = replace_string(str, "Your ", "Yer ");
    str = replace_string(str, "you're", "ye be");
    str = replace_string(str, "You're", "Ye be");
    str = replace_string(str, "here's", "here be");
    str = replace_string(str, "Here's", "Here be");
    str = replace_string(str, "who's", "who be");
    str = replace_string(str, "Who's", "Who be");
    str = replace_string(str, "what's", "what be");
    str = replace_string(str, "What's", "What be");
    str = replace_string(str, " his ", " he ");
    str = replace_string(str, "His ", "He ");
    str = replace_string(str, " her ", " she ");
    str = replace_string(str, "Her ", "She ");
    str = replace_string(str, " is ", " be ");
    str = replace_string(str, "Is ", "Be ");
    str = replace_string(str, "thbe", "this");
    str = replace_string(str, "Thbe", "This");
    str = replace_string(str, "the ", "th' ");
    str = replace_string(str, "The ", "Th' ");
    str = replace_string(str, " am ", " be ");
    str = replace_string(str, "I'm ", "I be ");
    str = replace_string(str, "Im ", "I be ");
    str = replace_string(str, "i'm ", "i be ");
    str = replace_string(str, "ing ", "in' ");
    str = replace_string(str, "ing ", "in' ");
    str = replace_string(str, "ing ", "in' ");
    str = replace_string(str, "ing.", "in'.");
    str = replace_string(str, "in'.c", "ing.c");
    str = replace_string(str, "in'.h", "ing.h");
    str = replace_string(str, "ing!", "in'!");
    str = replace_string(str, "there", "thar");
    str = replace_string(str, "There", "Thar");
    str = replace_string(str, "you ", "ye ");
    str = replace_string(str, "You ", "Ye ");
    str = replace_string(str, "it is not ", "'tain't ");
    str = replace_string(str, "It is not ", "'tain't ");
    str = replace_string(str, "it isn't ", "'tain't ");
    str = replace_string(str, "It isn't ", "'tain't ");
    str = replace_string(str, "it's not ", "'tain't ");
    str = replace_string(str, "It's not ", "'tain't ");
    str = replace_string(str, "it is ", "'tis ");
    str = replace_string(str, "It is ", "'tis ");
    str = replace_string(str, "It's ", "'tis ");
    str = replace_string(str, "my ", "me ");
    str = replace_string(str, "My ", "me ");
    str = replace_string(str, "of ", "o' ");
    str = replace_string(str, "Of ", "O' ");
    str = replace_string(str, "huh? ", "ehhhhh? ");
    str = replace_string(str, "Huh? ", "Ehhhhh? ");
    str = replace_string(str, "yes", "aye");
    str = replace_string(str, "Yes", "Aye");
    str = replace_string(str, "ayeterday", "yesterday");
    str = replace_string(str, "Ayeterday", "Yesterday");
    str = replace_string(str, "yepper ", "aye ");
    str = replace_string(str, "Yepper ", "Aye ");
    str = replace_string(str, "yep", "aye");
    str = replace_string(str, "Yep", "Aye");
    str = replace_string(str, "yeah", "aye");
    str = replace_string(str, "Yeah", "Aye");
    str = replace_string(str, "yea", "aye");
    str = replace_string(str, "Yea", "Aye");
    str = replace_string(str, "no ", "nay ");
    str = replace_string(str, "No ", "Nay ");
    str = replace_string(str, "no, ", "nay, ");
    str = replace_string(str, "No, ", "Nay, ");
    str = replace_string(str, "nope", "nay");
    str = replace_string(str, "Nope ", "Nay ");
    str = replace_string(str, "oh ", "ARRRRR ");
    str = replace_string(str, "oh, ", "ARRRRR, ");
    str = replace_string(str, " and ", " 'n' ");
    str = replace_string(str, " them ", " 'em ");
    str = replace_string(str, " were ", " was ");
    str = replace_string(str, " are ", " be ");
    str = replace_string(str, " to ", " t' ");
    str = replace_string(str, "who ", "'oo ");
    str = replace_string(str, "Who ", "'oo ");
    str = replace_string(str, " did ", " done ");
    str = replace_string(str, " said", " says");
    str = replace_string(str, " doesn't ", " don't ");
    str = replace_string(str, " does ", " do ");
    str = replace_string(str, "hehe", "har harr");
    str = replace_string(str, "heh", "harr");
    str = replace_string(str, "they ", "them ");
    str = replace_string(str, "They ", "Them ");
    str = replace_string(str, "hey ", "ahoy ");
    str = replace_string(str, "Hey ", "Ahoy ");
    str = replace_string(str, "hello", "ahoy");
    str = replace_string(str, "Hello", "Ahoy");
    str = replace_string(str, "hi ", "ahoy ");
    str = replace_string(str, "hiya", "ahoy");
    str = replace_string(str, "Hiya", "Ahoy");
    str = replace_string(str, ", guys", ", mateys");
    str = replace_string(str, "guys, ", "mateys, ");
    str = replace_string(str, "Guys, ", "Mateys, ");
    str = replace_string(str, "Hi ", "Ahoy ");
    str = replace_string(str, "hi,", "ahoy,");
    str = replace_string(str, "Hi,", "Ahoy,");
    str = replace_string(str, "howdy,", "ahoy,");
    str = replace_string(str, "Howdy,", "Ahoy,");
    str = replace_string(str, "howdy ", "ahoy ");
    str = replace_string(str, "wow", "shiver me timbers");
    str = replace_string(str, "Wow", "Shiver me timbers");
    str = replace_string(str, "WOW", "Shiver me timbers");
    str = replace_string(str, "omg", "shiver me timbers");
    str = replace_string(str, "OMG", "By Blackbeard's ghost!");
    str = replace_string(str, "omfg", "shiver me fucken' timbers");
    str = replace_string(str, "OMFG", "shiver me fucken' blasted timbers");
    str = replace_string(str, "stfu", "belay that guff");
    str = replace_string(str, "STFU", "Silence, animals!");
    str = replace_string(str, "wtf", "arr?");
    str = replace_string(str, "WTF", "ARR!?");
    str = replace_string(str, "stop", "avast");
    str = replace_string(str, "Stop", "Avast");
    str = replace_string(str, " stuff ", " booty ");
    str = replace_string(str, "there", "thar");
    str = replace_string(str, "There", "Thar");
    str = replace_string(str, "lol", "Yo Ho Ho");
    str = replace_string(str, " for ", " fer ");
    str = replace_string(str, "For ", "Fer ");
    str = replace_string(str, "LOL", "YO HO HO");
    str = replace_string(str, "rofl", "harr harr harr");
    str = replace_string(str, "ROFL", "HARR HARR HARR");
    //str = replace_string(str, "testing", "ARRR!");
    //str = replace_string(str, "test", "ARRR");
    //str = replace_string(str, "a ARRR", "a test");
    //str = replace_string(str, "to ARRR", "to test");
    if(random(100) < 1){
	switch(random(5)){
	case 0 : str = "Avast, me hearties! "+str;break;
	case 1 : str += " ARRRR!!";break;
	case 2 : str = "Well blow me down! "+str;break;
	case 3 : str += " YO HO HO!";break;
	case 4 : str += " Wench! Grog!";break;
	}
    }
    return str;
}


string eventFilter(string str){
    if(!str || !sizeof(str) || !stringp(str)) return "";
    //comment out the following line to enable the filter
    return str;
    write_file("/secure/log/prefilter.txt",str+"\n");
    str = PirateFilter(str);
    write_file("/secure/log/postfilter.txt",str+"\n");
    return str;
}