User Control Panel
|
|
|
 |
Advertisements
|
 |
|
|
|
HELP US, HELP YOU!
|
| Author |
Message |
Keenie Almost An Agent

Joined: 31 Oct 2003 Posts: 1071
 
|
Posted: Sun Feb 08, 2004 12:39 am Post subject: |
|
|
Something duncan wrote up, wondering what you guys thing, im not sure if its really needed but whatever, he wanted me to post.
this apparently gets the message when somebody pages you from a mobile phone
| Code: | | elsif ( $cmd eq 'IPG' )<br /> {<br /> #ignore everything but the from address and the message<br /> my $IPGline;<br /> my $msg;<br /> my $user;<br /> my $friendly;<br /> foreach $IPGline (@data){<br /> if ($IPGline =~ /<FROM pid=.+ name=\"(\S+)\"\/>/)<br /> {<br /> $user = $1;<br /> $friendly = $user;<br /> }<br /> if ($IPGline =~ /<TEXT>(\S+)<\/TEXT>/)<br /> {<br /> $msg = $1;<br /> }<br /> <br /> }<br /> $self->call_event("Message",$self,$user,$friendly,$msg,'2');<br /> <br /> } |
the 2, he added so you know its a page, he added a 1 for normal messages
he also added
| Code: | | if ($cmd eq 'IPG'|| $cmd eq 'NOT') {<br /> my $IPGtext = "";<br /> while ($IPGtext !~ "</NOTIFICATION>"){<br /> $IPGtext = $fh->getline();<br /> push @data, $IPGtext;<br /> }<br /> }<br /> |
at the top.. which I really dont like, but IPG's come in on seperate lines..
and this is to send messages to mobile phones, and to reply to the IPG
| Code: | | sub sendpgd <br />{<br /> my $self = shift;<br /> my $response = shift;<br /> my $destination = shift;<br /> my $header = "<TEXT xml:space=\"preserve\" enc=\"utf-8\">$response</TEXT>";<br /> $header =~ s/\n/\*lazy*\n/gs;<br /> $self->sendraw( 'PGD', $destination . ' 1 ' . length($header) . "\*lazy*\n" . $header );<br />}<br /> |
so you guys can decide, id never used it but i posted to make them happy lol
edit: oh and I havn't tested it, i dont have a phone to try it on |
|
| Back to top |
|
 |
|
|