User Control Panel
Advertisements

HELP US, HELP YOU!

setPSMData sub for Notification.pm

 
Post new topic   Reply to topic    Bot Depot Forum Index -> Commands
View unanswered posts
Author Message
dubbeld
Newbie
Newbie


Joined: 23 Jan 2005
Posts: 9

Reputation: 15.8Reputation: 15.8

PostPosted: Wed May 11, 2005 8:33 am    Post subject: Reply with quote

Code:
sub setPSMData<br />{<br />   my $self = shift;<br />   my $psm = shift;<br />   my $type = shift;<br />   my $music = shift;<br />   my $artist = shift;<br />   my $title = shift;<br />   my $btween = $title ? ' - {1}' : ''; <br />   my $ifmusic = $music ? '<CurrentMedia>\0'.$type.'\0'.$music.'\0{0}'.$btween.'\0'.$artist.'\0'.$title.'\0\0\0</CurrentMedia>' : '';<br />   my $data = '<Data><PSM>'.$psm.'</PSM>'.$ifmusic.'</Data>';<br />   <br />   $self->sendraw("UUX", length($data)."\r\n" . $data);<br />}


I've changed it a bit for the "new" things you can do with it...

for the music icon:
$msn->setPSMData("","Music",1,"title","artist");

for the game icon:
$msn->setPSMData("","Games",1,"the game...","");

for the office icon:
$msn->setPSMData("","Office",1,"the document...","");

if you don't want to use an icon:
$msn->setPSMData("Type the message you want","",0,"","");

(You must run a MSNP11 bot to use this script Wink)
Back to top
Addict
Not Yet a God
Not Yet a God


Joined: 21 Jan 2004
Posts: 473

Reputation: 34.4Reputation: 34.4Reputation: 34.4

PostPosted: Wed May 11, 2005 1:13 pm    Post subject: Reply with quote

Nice work. Good coding. Smile
Back to top
Farkie1
Newbie
Newbie


Joined: 30 Nov 2005
Posts: 7

Reputation: 5.4Reputation: 5.4Reputation: 5.4Reputation: 5.4Reputation: 5.4

PostPosted: Sun Dec 04, 2005 10:48 pm    Post subject: Reply with quote

Quote:
sub setPSMData
{
my $self = shift;
my $psm = shift;
my $type = shift;
my $music = shift;
my $artist = shift;
my $title = shift;
my $btween = $title ? ' - {1}' : '';
my $ifmusic = $music ? '<CurrentMedia>\0'.$type.'\0'.$music.'\0{0}'.$btween.'\0'.$artist.'\0'.$title.'\0\0\0</CurrentMedia>' : '';
my $data = '<Data><PSM>'.$psm.'</PSM>'.$ifmusic.'</Data>';
$self->sendraw("UUX", length($data)."\r\n" . $data);
}
Back to top
Display posts from previous:   
Post new topic   Reply to topic    Bot Depot Forum Index -> Commands All times are GMT
Page 1 of 1

 



Protected by phpBB Security phpBB-TweakS
phpBB Security Has Blocked 9 Exploit Attempts.
Antispam Captcha Mod by phpbb-security.com
Powered by phpBB © 2001, 2005 phpBB Group