Miranda IM

Results 1 to 7 of 7

Thread: MBot/MSP Auto Set Nickname and Status Message v0.1 support

  1. #1
    Join Date
    March 2005
    Location
    Santiago, Chile
    Posts
    362

    MBot/MSP Auto Set Nickname and Status Message v0.1 support

    /*
    * MBot/MSP Auto Set Nickname and Status Message v0.1
    * by souFrag
    * Released 31.08.2005
    * ICQ#50566818
    * http://www.soufrag.cl
    * Miranda IM en Español: http://www.mi-miranda.org
    */
    DOWNLOAD SCRIPT

    /****************************/
    /******* INSTALLATION *******/
    /****************************/
    /*
    /* Drag and drop this file to the MBot/MSP console :-)
    /*
    /****************************/

    /****************************/
    /******* DESCRIPTTION *******/
    /****************************/
    /*

    This script will change your nickname and/or status message every X period of time.
    In basic mode, you can set it to change your nick/status message every X minutes.
    If you change to ADVANCED_MODE you can use a cron-like syntax for specifing the frequency and ranges for this event.

    You may:
    - Calculate the remaining time from now to any date you want.
    - Show local time.
    - Generate a random word.
    - Generate a random number.
    - Any suggestion?

    I've only tested it with MSN and ICQ.
    MSN: can change nickname and status message (aka personal message).
    ICQ: can only change status message. I've suggested the ICQ developer to create a service so I can change the nickname. Let's wait to see what he says :-)

    Please let me know how it works with other protocols.

    */

    /****************************/
    /**** BEGIN CONFIGURATION ***/
    /****************************/

    /*
    These are the only lines you should edit.
    Just change the "right value" of define(left value, right value);
    */

    //Here you can add as many protocols as you want.
    //I've just tested this with MSN and ICQ, but ICQ doesn't support changing the nickname (just the status message).
    //If you have more thatn one copy of a protocol, you can add them as:
    //e.g. $protocols = array("MSN", "ICQ", "MSN2", "MSNwork", "ICQ2", "ICQ3");
    $protocols = array("MSN", "ICQ");

    //Change nickname? (true/false)
    define("SET_NICKNAME", true);

    //Change status message? (true/false)
    define("SET_STATUS_MESSAGE", true);

    //Here you must set the date you'd like to count from.
    define("HOUR", 0); // 0-23
    define("MINUTE", 0); // 0 - 59
    define("SECOND", 0); // 0 - 59
    define("MONTH", 1); // 1 - 12
    define("DAY", 1); // 1 - 31
    define("YEAR", 2006); // ? - ?

    /*
    Here you can use the following variables:

    COUNT FROM NOW TO THE DATE YOU'VE SET ABOVE:

    %yyyy% - Number of full years
    %q% - Number of full quarters
    %m% - Number of full months
    %y% - Difference between day numbers
    (eg 1st Jan 2004 is "1", the first day. 2nd Feb 2003 is "33". The datediff is "-32".)
    %d% - Number of full days
    %w% - Number of full weekdays
    %ww% - Number of full weeks
    %h% - Number of full hours
    %n% - Number of full minutes
    %s% - Number of full seconds

    LOCAL TIME:

    %time12% - Current time (12-hour format) as hh:mm am/pm (hour:minute am/pm)
    %time12_% - Current time (12-hour format without leading zeros) as h:mm am/pm (hour:minute am/pm)
    %time24% - Current time (24-hour format) as hh:mm (hour:minute)
    %time24_% - Current time (24-hour format without leading zeros) as h:mm (hour:minute)

    OTHER:

    %randomNumber% - Generates a random number between RAND_MIN_NUMBER and RAND_MAX_NUMBER
    %randomWord% - Generates a random word of RAND_CHARS characters

    Examples:
    define("NICKNAME", "Felipe / Just %n% minutes for my birthday!");
    define("NICKNAME", "My local time: %time12%");
    define("STATUS_MESSAGE", "Local time: %time12%");
    define("STATUS_MESSAGE", "I can generate random words and numbers: %randomWord%, %randomNumber%");

    */

    //The new nickname you'd like to be set.
    define("NICKNAME", "Felipe Brahm / Just %ww% weeks = %d% days = %h% hours = %n% minutes = %s% seconds to my birthday!");

    //The new status message you'd like to be set.
    define("STATUS_MESSAGE", "My local time is %time12_%");

    //Show PopUp every time the nickname is changed. Change this value to true or false (without quotes!).
    define("SHOW_POPUP", true);

    //Time interval (in minutes!) to change your nickname. It must be >= 1
    define("TIME_INTERVAL", 1);

    //Just change these values if you'd like to use the %randomNumber% or %randomWord% variables.
    define("RAND_MIN_NUMBER", 0);
    define("RAND_MAX_NUMBER", 99999);
    //Random generated word length.
    define("RAND_CHARS", 10);
    //Characters used when generating the random word.
    $chars = array('0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z', 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S' ,'T', 'U', 'V', 'W', 'X', 'Y', 'Z');

    //Change this to true so you can use the advanced time interval as follows:
    /*

    The smallest interval is one minute "* * *".
    Scheduler service uses cron-like syntax for specifing the frequency and ranges for events:
    a) * - matches all;
    b) A - matches one; (A < (60,24,7));
    c) * /N - matches every Nth; (N < (60,24,7)); (there is no space between * and /)
    d) A-B - matches all in range; (A < B AND B < (60,24,7));
    e) A,B,...,G-H,..Z - sum of single + ranges;
    f) mon, tue, wed, thu, fri, sat, sun - equivalents of 0,1,2,3,4,5,6;


    EXAMPLE:

    1. Every 5 minutes: "* /5 * *"
    (there is no space between * and /)

    2. saturday-sunday, 11:00 - 15:00, every 10 min: "* /10 11-15 sat-sun"
    (there is no space between * and /)

    3. mon,tue,fri 11:00,12:00,13:00: "00 11,12,13 0-1,fri"

    */
    define("ADVANCED_MODE", false);
    define("ADVANCED_TIME_INTERVAL", "*/10 11-15 sat-sun");

    /****************************/
    /**** END CONFIGURATION ***/
    /****************************/

    DOWNLOAD SCRIPT

    PLEASE POST ANY QUESTIONS/SUGGESTIONS IN THIS THREAD.
    Last edited by souFrag; 3 Sep 2005 at 9:34 AM.

  2. #2
    rokafeller Guest

    Suggestion - Request

    hallo,
    I appreciate your plugin.. and I think that you could add a nice feature: the possibility to set a nickname as consequence of the presence of an active process. I mean.. I'm chatting, then I start playing and/or working with my favourite game/office program .. then your plugin could sense the presence of the program (tetris.exe/winword.exe) and then set a different preset nickname (john smith - working/john smith - playing).

    do you think it's possible?
    thanx for your work

    bye

  3. #3
    Join Date
    March 2005
    Location
    Santiago, Chile
    Posts
    362
    Quote Originally Posted by rokafeller
    hallo,
    I appreciate your plugin.. and I think that you could add a nice feature: the possibility to set a nickname as consequence of the presence of an active process. I mean.. I'm chatting, then I start playing and/or working with my favourite game/office program .. then your plugin could sense the presence of the program (tetris.exe/winword.exe) and then set a different preset nickname (john smith - working/john smith - playing).

    do you think it's possible?
    thanx for your work

    bye
    Mmm I don't know how to do this with PHP, but I'll try to find out.
    Anyway, I don't have much free time right now, but I'll look into it later.
    Thx for you comments :-)

  4. #4
    Join Date
    March 2005
    Posts
    103
    You may take a look at my NGAwaySys. It uses such a procedure. Perhaps you can combine both scripts too. That would make sence.

  5. #5
    Join Date
    March 2005
    Location
    Santiago, Chile
    Posts
    362
    Quote Originally Posted by D46MD
    You may take a look at my NGAwaySys. It uses such a procedure. Perhaps you can combine both scripts too. That would make sence.
    Thx, I'll look into it :-)

  6. #6
    Join Date
    November 2008
    Posts
    3
    Quote Originally Posted by souFrag View Post
    Thx, I'll look into it :-)

    i cant get this to work... console says "cant load autoSetNicknameAndStatusMessage.php"

    ive installed php-5.2.6-win32-installer.msi... am i missing something???

  7. #7
    Join Date
    March 2005
    Location
    Santiago, Chile
    Posts
    362
    Quote Originally Posted by digilevi View Post
    i cant get this to work... console says "cant load autoSetNicknameAndStatusMessage.php"

    ive installed php-5.2.6-win32-installer.msi... am i missing something???
    You don't have to install php-5.2.6-win32-installer.msi...

    For instructions on how to install MSP you should post questions on the MSP thread.

    To install MSP you must download the latest version of MSP from the addons page:
    http://addons.miranda-im.org/details...ewfile&id=1584

    And the you must download the windows binaries corresponding to that MSP build (as today, PHP 5.1.4):
    http://museum.php.net/php5/php-5.1.4-Win32.zip

    You must copy php5ts.dll into your /Miranda IM/ directory.

Similar Threads

  1. mBot support
    By piopawlu in forum Plugins
    Replies: 755
    Last Post: 3 Nov 2012, 9:11 PM
  2. mBot Script: MBot/MSP Auto Set New Avatar
    By souFrag in forum Plugins
    Replies: 36
    Last Post: 29 Sep 2009, 8:53 AM
  3. Status Message doesn't support Unicode?
    By swstar in forum Technical Support
    Replies: 3
    Last Post: 19 Nov 2006, 3:51 AM
  4. NGAwaySys for mBot Support
    By D46MD in forum Plugins
    Replies: 47
    Last Post: 15 May 2006, 11:35 PM
  5. MBot Script: Change nickname on all MSN Accounts
    By Lunks in forum Feature Requests
    Replies: 2
    Last Post: 4 Jun 2005, 12:03 AM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •