Skip to content

Instantly share code, notes, and snippets.

@davesherratt
Created November 12, 2012 13:16
Show Gist options
  • Save davesherratt/4059341 to your computer and use it in GitHub Desktop.
Save davesherratt/4059341 to your computer and use it in GitHub Desktop.
set var %a
on *:text:!ring *:#: {
if ( $nick ison #fang.priv) { %a = $2- }
if (+* iswm %a) { /ring %a }
else { /msg #fang.priv 9looking up number for %a
/msg angelica .phone show %a }
}
on *:TEXT:*valid*:?: {
/msg #fang.priv 4 not a valid user
}
on *:TEXT:*cunt*:?: {
/msg #fang.priv 4 number is private
}
on *:TEXT:*+*:?: {
%a = $7-
if ( $nick == angelica ) { /ring %a }
}
alias ring {
comopen oSkype Skype4COM.Skype
/echo status: $com(oSkype,PlaceCall,3,bstr, $$1 , dispatch* oCall)
msg #fang.priv 9Calling $$1
timer422 1 12 /endcall | comclose oSkype }
else { /msg #fang.priv 4Call Failed }
comclose oSkype
}
}
@davesherratt
Copy link
Author

on *:text:!endring:#: {
if ( $nick ison #fang.priv) {
/endcall }
}
alias endcall {
if ( $com(oCall,Finish,1) == 1 ) { /msg #fang.priv �9Call ended }
else { /msg #fang.priv �4Call Failed }
unset %ring
comclose oCall
comclose oSkype
timerDropCall off
timerEndDropCall off
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment