Basic Script Commands

Discussion in 'Server and Client Scripting' started by supertrunks8, Jul 4, 2011.

Thread Status:
Not open for further replies.
  1. supertrunks8

    supertrunks8 Pwnage

    Joined:
    Jun 20, 2011
    Messages:
    350
    Likes Received:
    0
    Basic Script Commands

    Hi i'm going to show you some Basic Script Commands that you can use in your Script!

    /Me: To speak with *** before your name.
    }
    if(command == "me") {
    sys.sendAll("<b>*** " + sys.name(src) + " " + commandData);
    return;[/HIDE]

    /Players: To see how much Players are on that Server.
    }
    if (command == "players") {
    sys.sendMessage(src, "CountBot: There are " + sys.numPlayers() + " players online.");
    return;[/HIDE]


    /Auth: To see the Server Auth-Mods,Admins,Owners.

    }
    if (command == "auth") {
    var authlist = sys.dbAuths().sort()
    sys.sendMessage(src, "");
    if(commandData == "owners") {
    sys.sendMessage(src, "*** Owners ***")
    for(x in authlist) {
    if(sys.dbAuth(authlist[x]) == 3) {
    if(sys.id(authlist[x]) == undefined) {
    sys.sendHtmlMessage(src, "<timestamp/> " + authlist[x] + " (Offline)")
    }
    if(sys.id(authlist[x]) != undefined) {
    sys.sendHtmlMessage(src, "<font color =green><timestamp/>" + sys.name(sys.id(authlist[x])) + ' (Online)</font>')
    }
    }
    }
    sys.sendMessage(src, "");
    }
    if(commandData == "admins" || commandData == "administrators") {
    sys.sendMessage(src, "*** Administrators ***")
    for(x in authlist) {
    if(sys.dbAuth(authlist[x]) == 2) {
    if(sys.id(authlist[x]) == undefined) {
    sys.sendHtmlMessage(src, "<timestamp/>" + authlist[x] + " (Offline)")
    }
    if(sys.id(authlist[x]) != undefined) {
    sys.sendHtmlMessage(src, "<font color =green><timestamp/> " + sys.name(sys.id(authlist[x])) + ' (Online)</font>')
    }
    }
    }
    sys.sendMessage(src, "");
    }
    if(commandData == "mods" || commandData == "moderators") {
    sys.sendMessage(src, "*** Moderators ***")
    for(x in authlist) {
    if(sys.dbAuth(authlist[x]) == 1) {
    if(sys.id(authlist[x]) == undefined) {
    sys.sendHtmlMessage(src, "<timestamp/> " + authlist[x] + " (Offline)")
    }
    if(sys.id(authlist[x]) != undefined) {
    sys.sendHtmlMessage(src, "<font color =green><timestamp/> " + sys.name(sys.id(authlist[x])) + ' (Online)</font>')
    }
    }
    }
    sys.sendMessage(src, "");
    }
    if(commandData != "moderators" && commandData != "mods" && commandData != "administrators" && commandData != "admins" && commandData != "owners") {
    sys.sendMessage(src, "*** Owners ***")
    for(x in authlist) {
    if(sys.dbAuth(authlist[x]) == 3) {
    if(sys.id(authlist[x]) == undefined) {
    sys.sendHtmlMessage(src, "<timestamp/> " + authlist[x] + " (Offline)")
    }
    if(sys.id(authlist[x]) != undefined) {
    sys.sendHtmlMessage(src, "<font color =green><timestamp/> " + sys.name(sys.id(authlist[x])) + ' (Online)</font>')
    }
    }
    }
    sys.sendMessage(src, "");
    sys.sendMessage(src, "*** Administrators ***")
    for(x in authlist) {
    if(sys.dbAuth(authlist[x]) == 2) {
    if(sys.id(authlist[x]) == undefined) {
    sys.sendHtmlMessage(src, "<timestamp/> " + authlist[x] + " (Offline)")
    }
    if(sys.id(authlist[x]) != undefined) {
    sys.sendHtmlMessage(src, "<font color=green><timestamp/> " + sys.name(sys.id(authlist[x])) + ' (Online)</font>')
    }
    }
    }
    sys.sendMessage(src, "");
    sys.sendMessage(src, "*** Moderators ***")
    for(x in authlist) {
    if(sys.dbAuth(authlist[x]) == 1) {
    if(sys.id(authlist[x]) == undefined) {
    sys.sendHtmlMessage(src, "<timestamp/> " + authlist[x] + " (Offline)")
    }
    if(sys.id(authlist[x]) != undefined) {
    sys.sendHtmlMessage(src, "<font color =green><timestamp/> " + sys.name(sys.id(authlist[x])) + ' (Online)</font>')
    }
    }
    }
    }
    return;[/HIDE]

    /SendHtmlAll: To send your own HTML in main chat.

    }
    }
    if(command == "sendhtmlall") {
    sys.sendHtmlAll(" " + commandData + "
    return;[/HIDE]

    /SendAll: To send a message to everyone!

    }
    if(command == "sendall") {
    sys.sendAll(" " + commandData + "
    return;[/HIDE]

    /Burn,Poison,Freeze,Cure: It will show:
    EX: coyotte508 was burned by Darkness
    EX: coyotte508 was frozen by Darkness
    EX: coyotte508 was poisoned by Darkness
    EX: coyotte508 was cured by Darkness

    }
    if (command == "burn") {
    if (tar == undefined) {
    sys.sendMessage(src, "You fail bot. This person doesn't exist");
    return;
    }
    sys.sendHtmlAll("<img src=Themes/Classic/status/battle_status4.png><b><font color=red><font size=4>" + commandData + " was burned by " + sys.name(src) + " <img src=Themes/Classic/status/battle_status4.png>");
    return;

    }
    if (command == "poison") {
    if (tar == undefined) {
    sys.sendMessage(src, "You fail bot. This person doesn't exist");
    return;
    }
    sys.sendHtmlAll("<img src=Themes/Classic/status/battle_status5.png><b><font color=Purple><font size=4> " + commandData + " was poisoned by " + sys.name(src) + " <img src=Themes/Classic/status/battle_status5.png>");
    return;

    }
    if (command == "freeze") {
    if (tar == undefined) {
    sys.sendMessage(src, "You fail bot. This person doesn't exist");
    return;
    }
    sys.sendHtmlAll("<img src=Themes/Classic/status/battle_status3.png><b><font color=blue><font size=4> " + commandData + " was frozen by " + sys.name(src) + " <img src=Themes/Classic/status/battle_status3.png>");
    return;

    }
    if (command == "cure") {
    if (tar == undefined) {
    sys.sendMessage(src, "You fail bot. This person doesn't exist");
    return;
    }
    sys.sendHtmlAll("<img src=Themes/Classic/status/battle_status2.png><b><font color=Black><font size=3> " + commandData + " was cured by " + sys.name(src) + " <img src=Themes/Classic/status/battle_status2.png>");
    return;[/HIDE]

    Well this is like for any random answer.*You can change it up ._.*
    EX: (16:31:26) ~+FunnyBot~: Pokemonexpert got beat with a base ball bat!

    }
    if(command == "hurt") {
    if (tar == undefined) {
    sys.sendMessage(src, "~~Bot~~: You fail bot. That person is either not on or does not exist!");
    return;
    }
    var Links=new Array();
    Links[1]="~+FunnyBot~: " + commandData + " got beat with a base ball bat!";
    Links[2]="~+FunnyBot~: " + commandData + " was walking home and a car hit him/her and backed up and ran over again! xp";
    Links[3]="~+FunnyBot~: " + commandData + " was lucky and nothing happened *plane crashes into his/her bedroom* nevermind.. LOL";
    Links[4]="~+FunnyBot~: " + commandData + " got shot by a gun 3 times and died!";
    Links[5]="~+FunnyBot~: " + commandData + " ate a sandwitch and 30 seconds later... it blew up and he/her died!";
    var i = Math.floor(5*Math.random())
    sys.sendAll(Links);
    return;[/HIDE]

    /Kick: To kick the user from your Server.

    }
    if (command == "kick") {
    if (sys.auth(src) < 1) {
    }
    if (sys.maxAuth(sys.ip(tar))>=sys.auth(src)) {
    sys.sendMessage(src, "+Bot: Can't do that to higher auth! Smarty");
    return;
    sys.sendMessage(src, "You cannot use this command! Smart one.....");
    return;
    }
    if (tar == undefined) {
    sys.sendMessage(src, "You fail bot. This person doesn't exist");
    return;
    }
    sys.kick(tar)
    sys.sendHtmlAll("<b><font color=red><font size=5>" + commandData + " was kicked~ by " + sys.name(src) + "! OWNED!!!");
    return;[/HIDE]

    /Mute: To mute someone, basically they can't talk in Main Chat. Only PM.

    }
    if (command == "mute") {
    if (tar == undefined) {
    sys.sendMessage(src, "You fail bot. This person does not exist.");
    return;
    }
    if (sys.auth(tar) >= sys.auth(src)) {
    sys.sendMessage("You dont have sufficient auth to mute " + commandData + ".");
    return;
    }
    sys.sendHtmlAll("<b><font color=blue><font size=5> " + commandData + " has been muted~ by " + sys.name(src) + "! aww HAHA!!!");
    muted[tar] = true;
    return;[/HIDE]

    /UnMute: To let someone talk again.

    }
    if (command == "unmute") {
    if (tar == undefined) {
    sys.sendMessage(src, "You fail bot. This person does not exist.");
    return;
    }
    sys.sendHtmlAll("<b><font color=green><font size=5>" + commandData + " was unmuted~ by " + sys.name(src) + "! lucky.....");
    muted[tar] = false;
    return;[/HIDE]



    /Ban: To ban someone from your Server. They won't be able to come back on.

    }
    if (command == "ban") {
    if(sys.dbIp(commandData) == undefined) {
    sendChanMessage(src, "+Bot: No player exists by this name! Lol xp U fail");
    return;
    }
    if (sys.maxAuth(sys.ip(tar))>=sys.auth(src)) {
    sendChanMessage(src, "+Bot: You can't ban this person. smart one????");
    return;
    }
    ip = sys.dbIp(commandData)
    alias=sys.aliases(ip)
    y=0
    for(var x in alias) {
    z = sys.dbAuth(alias[x])
    if (z > y) {
    y=z
    }
    }
    if(y>=sys.auth(src)) {
    sendChanMessage(src, "+Bot: You can't ban this person. smart one????");
    return;
    }
    banlist=sys.banList()
    for(a in banlist) {
    if(sys.dbIp(commandData) == sys.dbIp(banlist[a])) {
    sendChanMessage(src, "+Bot: He/she's already banned!");
    return;
    }
    }
    sys.sendHtmlAll('<b><font color=red>' + commandData + ' was banned by ' + sys.name(src) + '!</font></b>');
    if(tar != undefined) {
    sys.kick(tar)
    }
    sys.ban(commandData)
    sys.appendToFile('bans.txt', sys.name(src) + ' banned ' + commandData + "\n")
    return;[/HIDE]

    /UnBan: To unban that User so they can come back on.

    }
    if (command == "unban") {
    if(sys.dbIp(commandData) == undefined) {
    sendChanMessage(src, "+Bot: No player exists by this name!");
    return;
    }
    banlist=sys.banList()
    for(a in banlist) {
    if(sys.dbIp(commandData) == sys.dbIp(banlist[a])) {
    sys.unban(commandData)
    sendChanMessage(src, "+Bot: You unbanned " + commandData + "!");
    sys.appendToFile('bans.txt', sys.name(src) + ' unbanned ' + commandData + "\n")
    return;
    }
    }
    sendChanMessage(src, "+Bot: He/she's not banned!");
    return;[/HIDE]

    /BanList: To see the people who are banned from your Server.

    }
    if (command == "banlist") {
    list=sys.banList();
    list.sort();
    var nbr_banned=5;
    var max_message_length = 30000;
    var table_header = '<table border="1" cellpadding="5" cellspacing="0"><tr><td colspan='+nbr_banned+'><center><strong>Banned list</strong></center></td></tr><tr>';
    var table_footer = '</tr></table>';
    var table=table_header;
    var j=0;
    var line = ''
    for (var i=0; i<list.length; ++i){
    if (typeof commandData == 'undefined' || list.toLowerCase().indexOf(commandData.toLowerCase()) != -1){
    ++j;
    line += '<td>'+list+'</td>';
    if(j == nbr_banned && i+1 != list.length){
    if (table.length + line.length + table_footer.length > max_message_length) {
    if (table.length + table_footer.length <= max_message_length)
    sys.sendHtmlMessage(src, table + table_footer, channel);
    table = table_header;
    }
    table += line + '</tr><tr>';
    line = '';
    j=0;
    }
    }
    }
    table += table_footer;
    sys.sendHtmlMessage(src, table.replace('</tr><tr></tr></table>', '</tr></table>'),channel);
    return;[/HIDE]

    /IP: *To see there IP Address* To show there IP Address, so if you want to rangeban them.

    }
    if (command == "ip") {
    if (commandData=="undefined") {
    return;
    }
    var tari = sys.id(commandData);
    sys.sendHtmlMessage(src, "<timestamp/><B><font color=red>IP Bot: </b><font color=black>" + sys.name(tari) + "'s IP address is " + sys.ip(tari));
    return;[/HIDE]

    /ClearChat: To clear the chat, it will be a blank Server screen untill someone talks again.

    }
    if (command == "clearchat") {
    if (sys.auth(src) < 2) {
    sys.sendMessage(src, "You cannot use this command!");
    return;
    }
    sys.sendHtmlAll("<br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br/><br/>" + sys.name(src) + " has just cleared the chat!");
    return;[/HIDE]


    /User: To make someone a Server User.

    }
    if (command == "user") {
    if (sys.auth(src) < 3) {
    sys.sendMessage(src, "You cannot use this command!");
    return;
    }
    sys.sendHtmlAll("<b><font color=blue><font size=4>" + sys.name(src) + " made " + commandData + " a server user.");
    sys.changeAuth(tar, 0)
    return;[/HIDE]

    /Mod: To make someone a Server Moderator.

    }
    if (command == "mod") {
    if (sys.auth(src) < 3) {
    sys.sendMessage(src, "You cannot use this command!");
    return;
    }
    sys.sendHtmlAll("<b><font color=blue><font size=4>" + sys.name(src) + " made " + commandData + " a server moderator.");
    sys.changeAuth(tar, 1)
    return;[/HIDE]

    /Admin: [COLOR="orange"]To make someone a Server Administrator.[/COLOR]

    [SPOILER]}
    if (command == "admin") {
    if (sys.auth(src) < 3) {
    sys.sendMessage(src, "You cannot use this command!");
    return;
    }
    sys.sendHtmlAll("<b><font color=blue><font size=4>" + sys.name(src) + " made " + commandData + " a server administrator.");
    sys.changeAuth(tar, 2)
    return;[/HIDE]

    /Owner:[COLOR="green"] To make someone a Server Owner.[/COLOR]

    [SPOILER]}
    if (command == "owner") {
    if (sys.auth(src) < 3) {
    sys.sendMessage(src, "You cannot use this command!");
    return;
    }
    sys.sendHtmlAll("<b><font color=blue><font size=4>" + sys.name(src) + " made " + commandData + " a server owner.");
    sys.changeAuth(tar, 3)
    return;[/HIDE]

    /Invisible: [COLOR="gray"]Well owner is 3 and Invisible is 4. So Invisible can Ban/Kick/Mute Owners.
    They rule the Server. Unless they have the Server Window :p[/COLOR]

    [SPOILER]}
    if (command == "invisible") {
    if (sys.auth(src) < 3) {
    sys.sendMessage(src, "You cannot use this command!");
    return;
    }
    sys.sendHtmlAll("<b><font color=blue><font size=4>" + sys.name(src) + " made " + commandData + " have INVISIBLE! auth *level 4*");
    sys.changeAuth(tar, 4)
    return;[/HIDE]

    /Imp-ImpOff: To IMP someone, it will show:
    (16:37:04) Bot: Now you are Script Testing!
    (16:37:06) Script Testing: Test.
    (16:37:12) Bot: Now you are yourself!
    (16:37:15) +Pokemonexpert: Test.

    [SPOILER]}
    if (command == "imp") {
    impersonation[src] = commandData;
    sys.sendMessage(src, "Bot: Now you are " + impersonation[src] + "!");
    return;
    }
    if (command == "impoff") {
    delete impersonation[src];
    sys.sendMessage(src, "Bot: Now you are yourself!");
    return;[/HIDE]

    /Rules: [COLOR="red"]To show the Server Rules like:[/COLOR]

    (16:37:57) *** Rules ***

    (16:37:57) Rule #1 - Do Not Abuse CAPS:
    (16:37:57) - The occasional word in CAPS is acceptable, however repeated use is not.
    (16:37:57) Rule #2 - No Flooding the Chat:
    (16:37:57) - Please do not post a large amount of short messages when you can easily post one or two long messages.
    (16:37:57) Rule #3 - Do not Challenge Spam:
    (16:37:57) - If a person refuses your challenge, this means they do not want to battle you. Find someone else to battle with.
    (16:37:57) Rule #4 - Don't ask for battles in the main chat:
    (16:37:57) - There is a 'Find Battle' tab that you can use to find a battle immediately. If after a while you cannot find a match, then you can ask for one in the chat.
    (16:37:57) Rule #5 - No Trolling/Flaming/Insulting of Any kind:
    (16:37:57) - Behaving stupidly and excessive vulgarity will not be tolerated, using words including 'fuck' is a bad starting point.
    (16:37:57) Rule #6 - Be Respectable of Each Others Cultures:
    (16:37:57) - Not everyone speaks the same language. This server is not an English-Only Server. Do not tell someone to only speak a certain language.
    (16:37:57) Rule #7 - No Advertising:
    (16:37:57) - There will be absolutely no advertising on the server.
    (16:37:57) Rule #8 - No Obscene or Pornographic Content Allowed:
    (16:37:57) - This includes links, texts, images, and any other kind of media. This will result in an instant ban.
    (16:37:57) Rule #9 - Do not ask for Auth:
    (16:37:57) - Authority is given upon merit. By asking you have pretty much eliminated your chances at becoming an Auth in the future.
    (16:37:57) Rule #10 - Do not Insult Auth:
    (16:37:57) - Insulting Auth will result in immediate punishment.
    (16:37:57) Rule #11 - No minimodding:
    (16:37:57) - Server has moderators for a reason. If someone breaks the rules, alert the auth, do not try to moderate yourself.
    [B][COLOR="blue"]*****Those are current Pokemon Online Server Rules!*****[/COLOR][/B][COLOR="blue"][/COLOR]



    [SPOILER]}
    if(command == "rules") {
    sys.sendHtmlMessage(src, "*Add Rules Here*
    return;[/HIDE]

    [COLOR="black"]If you want to learn the functions click [URL="http://pokemon-online.eu/forums/showthread.php?1708-Script-functions-documentation"][COLOR="red"][B]here[/B][/COLOR][/URL][COLOR="red"][B][/B][/COLOR]![COLOR="brown"] *Credit to [/COLOR][B][COLOR="green"]Mystra[/COLOR][/B]


    [U][COLOR="yellow"]Thats It![/COLOR][/U][COLOR="yellow"][/COLOR]
    [I][COLOR="blue"]*Sorry if it is out of order. But they still work!*[/COLOR][/I][COLOR="blue"][/COLOR]

    [B][COLOR="red"]Enjoy!~[/COLOR][/B][/COLOR][/SPOILER][/SPOILER][/SPOILER][/SPOILER][/SPOILER]
     
    Last edited: Jul 4, 2011
  2. Twistedspoon

    Twistedspoon Member

    Joined:
    Apr 17, 2011
    Messages:
    253
    Likes Received:
    0
    Nice job darkcloud.
    Edit: Add descriptions as far as what each command does or can do.
     
    Last edited: Jul 4, 2011
  3. Mystra

    Mystra Active Member

    Joined:
    Jul 12, 2010
    Messages:
    1,389
    Likes Received:
    4
    Here could be a link if our staff wasn't so slow…

    EDIT: "Invisible" has some implications. Auth level 4 can (and will) post HTML directly.

    Hello, HTML posting :}
     
  4. Lamperi

    Lamperi I see what you did there

    Joined:
    Apr 25, 2010
    Messages:
    2,647
    Likes Received:
    11
    Tempted to lock because of poor quality. Please explain more, don't just copypaste commands from some scripts. Ie. where these scripts should be pasted for them to work?
     
  5. supertrunks8

    supertrunks8 Pwnage

    Joined:
    Jun 20, 2011
    Messages:
    350
    Likes Received:
    0
    Lamperi, i'm not just Copying and posting them, those were from my script, : http://pastebin.com/TNEh6QrT <-- I'm not done tho, and i'm gonna make them better ._. And im posting them for the people who would like to Create a Script, they can use some Basic Commmands to get started... and lul @Mystra, I fixed it :D
     
    Last edited: Jul 4, 2011
  6. Lamperi

    Lamperi I see what you did there

    Joined:
    Apr 25, 2010
    Messages:
    2,647
    Likes Received:
    11
    Make sure you include everything, like the impersonation won't work with just that command, you need the other part too >_>
     
  7. supertrunks8

    supertrunks8 Pwnage

    Joined:
    Jun 20, 2011
    Messages:
    350
    Likes Received:
    0
    Yeah it will, but there is another part of that command, when i tested at my Server it worked fine like that........ :\
     
  8. KiZoRo

    KiZoRo New Member

    Joined:
    Jul 4, 2011
    Messages:
    13
    Likes Received:
    0
    PO Trainer Name:
    Yupia
    I am newbie in scripts so can someone help me?
    I paste scripts code in server scripts, but have Fatal Script Error line 1: SyntaxError: Parse error
    Help please =D
     
  9. Kalashnikov

    Kalashnikov Despite the code quality

    Joined:
    Apr 4, 2011
    Messages:
    434
    Likes Received:
    0
  10. supertrunks8

    supertrunks8 Pwnage

    Joined:
    Jun 20, 2011
    Messages:
    350
    Likes Received:
    0
    I use them because thats how I do the commands, they still work but I just use them in a different way. *Still Work!* :D
     
  11. Lamperi

    Lamperi I see what you did there

    Joined:
    Apr 25, 2010
    Messages:
    2,647
    Likes Received:
    11
    just wow. ;_;
     
  12. Viderizer

    Viderizer Admin/Developer

    Joined:
    Mar 12, 2011
    Messages:
    277
    Likes Received:
    0
    /clearchat is totally useless, it just adds empty rows lol. You can right click on the client's textbox and press Clear; it clears the chat.
     
  13. Kalashnikov

    Kalashnikov Despite the code quality

    Joined:
    Apr 4, 2011
    Messages:
    434
    Likes Received:
    0
    No, it cleares chat for all, not just you, so administrator can kinda hide some spam/NSW content/etc.
    The only problem I can see: It cleares chats of all chanels.
    Iirc, there are different functions for different auth group in the scripts, there is no need to check auth in the comand itself.
     
    Last edited: Jul 5, 2011
  14. Lamperi

    Lamperi I see what you did there

    Joined:
    Apr 25, 2010
    Messages:
    2,647
    Likes Received:
    11
    You still have the scrollback.
     
  15. Kalashnikov

    Kalashnikov Despite the code quality

    Joined:
    Apr 4, 2011
    Messages:
    434
    Likes Received:
    0
    You can say the same for Ctrl L or clear in *nix, and Mac terminals. It's an emergengy measure to quickly hide something, not to erase it completely, I see nothing wrong.
     
  16. Lamperi

    Lamperi I see what you did there

    Joined:
    Apr 25, 2010
    Messages:
    2,647
    Likes Received:
    11
    Except the method is ugly >_>

    Too bad PO doesn't support anything better.
     
  17. Mystra

    Mystra Active Member

    Joined:
    Jul 12, 2010
    Messages:
    1,389
    Likes Received:
    4
    Good thing PO does not support anything better. I'd be pretty annoyed if server decided that the content I had on my screen is no longer needed. It's not server's job to police my screen %)
     
  18. Viderizer

    Viderizer Admin/Developer

    Joined:
    Mar 12, 2011
    Messages:
    277
    Likes Received:
    0
    I think in sendHtmlAll() there was a 2nd parameter like

    Code (javascript):
    1.  
    2. sys.sendHtmlAll("BlahBlah", chan);
    3.  
    That does it in the channel that the command was used; It was something like chan or channel


    EDIT: Also agree with you Mystra
     
  19. Kalashnikov

    Kalashnikov Despite the code quality

    Joined:
    Apr 4, 2011
    Messages:
    434
    Likes Received:
    0
    No, accordint to documentation:
    So this clearchat will clear all the chats.
     
  20. Lamperi

    Lamperi I see what you did there

    Joined:
    Apr 25, 2010
    Messages:
    2,647
    Likes Received:
    11
    I'm already annoyed by the usage of HTML in PO, makes it difficult to develop client using anything else that Qt's Rich Text or full HTML 8)
     
  21. Mystra

    Mystra Active Member

    Joined:
    Jul 12, 2010
    Messages:
    1,389
    Likes Received:
    4
    Not really. Just don't use scripts which print HTML. PO itself do not send HTML as far as I'm aware of. All those ~~~ and username: blah are colored by client.
     
  22. Viderizer

    Viderizer Admin/Developer

    Joined:
    Mar 12, 2011
    Messages:
    277
    Likes Received:
    0
    If you use

    Code (javascript):
    1.  
    2. sys.sendHtmlAll("Test", channel);
    3.  
    It will send "Test" to the channel where it was used.
     
  23. Kalashnikov

    Kalashnikov Despite the code quality

    Joined:
    Apr 4, 2011
    Messages:
    434
    Likes Received:
    0
    Check his function again:
    Code (text):
    1. sys.sendHtmlAll("Wall of brs" + sys.name(src) + " has just cleared the chat!");
    It has only one argument.
     
  24. Lamperi

    Lamperi I see what you did there

    Joined:
    Apr 25, 2010
    Messages:
    2,647
    Likes Received:
    11
    it's the problem, PO server uses it heavily, with shanai and mutelists / other commands. (Other servers too, at least PBC)

    The second argument is optional and in this case the command floods every channel with PO's implementation.
     
Thread Status:
Not open for further replies.