1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.
  2. Guest, PO has ceased our separate tiering and adopted Smogon tiers for SM. More information and updates here.

    Dismiss Notice

[Client Scripting] Channel object

Discussion in 'Server and Client Scripting' started by MidwayMarshall, Nov 5, 2015.

  1. MidwayMarshall

    MidwayMarshall woof Forum Moderator Developer Forum Moderator Developer

    Joined:
    Jun 13, 2014
    Messages:
    303
    Likes Received:
    170
    List of available methods to the Channel object when Client Scripting

    Invokables
    Code (javascript):
    1. int id();
    2. QString name();
    3.  
    4. QStringList players();
    5. bool hasPlayer(int player);
    6. bool hasRemoteKnowledgeOf(int player);
    7.  
    8. void sortAllPlayersByTier();
    9. void sortAllPlayersNormally();
    10.  
    11. void addEvent(int event);
    12. void removeEvent(int event);
    13. bool eventEnabled(int event);
    14. void resetEvents();
    15. void restoreEventSettings();
    16.  
    17. void makeReadyToQuit();
    18. bool isReadyToQuit();
    19. QString addChannelLinks(QString &line);
    20. void checkFlash(QString &haystack, QString &needle);
    21.  
    22. void printLine(QString &str, bool flashing, bool act, bool global);
    23. void printLine(QString &str, bool flashing, bool act);
    24. void printLine(QString &str, bool flashing);
    25. void printLine(QString &str); //  true,     true,     false
    26. void printHtml(QString &str, bool act, bool global);
    27. void printHtml(QString &str, bool act);
    28. void printHtml(QString &str); //  true,     false

    Signals
    Code (javascript):
    1. void quitChannel(int chanid);
    2. void battleReceived2(int battleid, const Battle &battle);
    3. void activated(Channel *c);
    4. void pactivated(Channel *c);

    Slots
    Code (javascript):
    1. void showContextMenu(const QPoint &point);
    2. void anchorClicked(const QUrl &url);



    List from Reflection
    Code (javascript):
    1. activated(Channel*)
    2. addChannelLinks(QString)
    3. addEvent(int)
    4. anchorClicked(QUrl)
    5. battleReceived2(int,Battle)
    6. checkFlash(QString,QString)
    7. deleteLater()
    8. destroyed()
    9. destroyed(QObject*)
    10. eventEnabled(int)
    11. hasPlayer(int)
    12. hasRemoteKnowledgeOf(int)
    13. id()
    14. isReadyToQuit()
    15. makeReadyToQuit()
    16. name()
    17. objectNameChanged(QString)
    18. pactivated(Channel*)
    19. players()
    20. printHtml(QString)
    21. printHtml(QString,bool)
    22. printHtml(QString,bool,bool)
    23. printLine(QString)
    24. printLine(QString,bool)
    25. printLine(QString,bool,bool)
    26. printLine(QString,bool,bool,bool)
    27. quitChannel(int)
    28. removeEvent(int)
    29. resetEvents()
    30. restoreEventSettings()
    31. showContextMenu(QPoint)
    32. sortAllPlayersByTier()
    33. sortAllPlayersNormally()
     
    Nightfall Alicorn likes this.