Telephone, mIRC style

Platform:  mIRC
Published  Mar 30, 2005
Updated  May 17, 2007
This took me one day to make, and another to make again properly. :P Unlike most scripts, this is intended for an mIRC bot, rather than a user. This Telephone script can link together 2 channels, a channel and a user, or 2 users. If you are in a channel, type !dial <channel/user>. This will link the channel or user to the channel. All messages typed in the channel relayed to the channel/user. A linked channel can respond by typing in the channel, and a linked user can respond by querying messages to the bot. Users can link to channels or another user by querying !dial <channel/user>. This communication can be stopped by a user on either side typing !hangup. Wow, that was a long explanation; If any of this confuses you, comment below, or email me at DiddyPZC@gmail.com.

Those semicolons look crooked, but they line up in the script editor. :P I just fixed an error I found in the script. Please get it again, if you previously took it. ;---------------------------------------------------------------------;
; Telephone Script v1.0 ;
; Copyright Austin D 2005 ;
; ;
; use this to link together channels, a channel and a user, ;
; or two users. Type !dial <channel/user> to your bot, in ;
; a channel, or in a query with it. You should connect to ;
; that user/channel. Have fun! ;
; ;
; This code is intended to be used for mIRC bots. ;
; Feel free to use and edit this script to your needs! ;
; Please leave this comment header here, thanks. ;
;---------------------------------------------------------------------;

on *:TEXT:!hangup*:?: {
if ($chan == $null) {
msg %dial_line1 $nick has chosen to hang up the phone!
msg %dial_line2 $nick has chosen to hang up the phone!
set %dial OFF
unset %dial_line1
unset %dial_line2
}
else {
msg %dial_line1 $nick has chosen to hang up the phone!
msg %dial_line2 $nick has chosen to hang up the phone!
set %dial OFF
unset %dial_line1
unset %dial_line2
}
}

on *:TEXT:!hangup*:#: {
if ($chan == $null) {
msg %dial_line1 $nick has chosen to hang up the phone!
msg %dial_line2 $nick has chosen to hang up the phone!
set %dial OFF
unset %dial_line1
unset %dial_line2
}
else {
msg %dial_line1 $nick has chosen to hang up the phone!
msg %dial_line2 $nick has chosen to hang up the phone!
set %dial OFF
unset %dial_line1
unset %dial_line2
}
}


on *:TEXT:!dial*:#: {
if (%dial == ON) {
msg $chan This call can not be completed as dialed. Please hang up, and try your call again.
halt
}
else {
set %dial_line1 $chan
set %dial_line2 $2
if (%dial_line1 == %dial_line2) {
msg $chan You can't call yourself!! o_O
halt
}
else {
set %dial ON
msg %dial_line1 Dialing 1-800- $+ %dial_line2 $+ ...
join $2
timer 1 1 msg %dial_line1 %dial_line1 and %dial_line2 are now linked! Ops: Have me leave at any time with !hangup.
timer 1 1 msg %dial_line2 %dial_line2 and %dial_line1 are now linked! Ops: Have me leave at any time with !hangup.
}
}
}

on *:TEXT:!dial*:?: {
if (%dial == ON) {
msg $nick This call can not be completed as dialed. Please hang up, and try your call again.
}
else {
set %dial ON
set %dial_line1 $nick
set %dial_line2 $2
if (%dial_line1 == %dial_line2) {
msg $chan You can't call yourself!! o_O
halt
}
else {
msg %dial_line1 Dialing 1-800- $+ %dial_line2 $+ ...
timer 1 2 msg %dial_line1 You are now linked with %dial_line2 $+ . You may disconnect from %dial_line2 at any time with !hangup.
timer 1 2 msg %dial_line2 You are now linked with %dial_line1 $+ . You may disconnect from %dial_line1 at any time with !hangup.
}
}
}

on *:TEXT:*:%dial_line1: {
if (%dial == ON) {
msg %dial_line2  ( $+ $chan $+ ) < $+ $nick $+ > $1-
}
else {
halt
}
}

on *:TEXT:*:?: {
if (%dial == ON) {
if ($nick == %dial_line1) {
msg %dial_line2  (Query) < $+ $nick $+ > $1-
}
elseif ($nick == %dial_line2) {
msg %dial_line1  (Query) < $+ $nick $+ > $1-

}
else {
halt
}
}
else {
halt
}
}

on *:ACTION:*:%dial_line1: {
if (%dial == ON) {
msg %dial_line2  ( $+ $chan $+ ) 6* $1-
}
else {
halt
}
}

on *:ACTION:*:?: {
if (%dial == ON) {
if ($nick == %dial_line1) {
msg %dial_line2  (Query) 6* $nick $1-
}
elseif ($nick == %dial_line2) {
msg %dial_line1  (Query) 6* $nick $1-

}
else {
halt
}
}
else {
halt
}
}

on *:JOIN:%dial_line1: {
if (%dial == ON) {
msg %dial_line2  ( $+ $chan $+ ) 3* $nick ( $+ $mask($address,3) $+ ) has joined %dial_line1
}
else {
halt
}
}

on *:PART:%dial_line1: {
if (%dial == ON) {
msg %dial_line2  ( $+ $chan $+ ) 3* $nick ( $+ $mask($address,3) $+ ) has left %dial_line1
}
else {
halt
}
}

on *:QUIT: {
if (%dial == ON) {
if ( $nick ison %dial_line1 ) {
msg %dial_line2  ( $+ $chan $+ ) 2* $nick has quit IRC 3( $+ $1- $+ )
}
else {
halt
}
}
}

on *:NICK: {
if (%dial == ON) {
if ($comchan($newnick,1) == %dial_line1) {
msg %dial_line2  ( $+ $chan $+ ) 3* $nick is known as $newnick
}
else {
halt
}
}
}

on *:KICK:%dial_line1: {
if (%dial == ON) {
msg %dial_line2  ( $+ $chan $+ ) 3* $knick was kicked by $nick ( $+ $2- $+ )
}
else {
halt
}
}

on *:OP:%dial_line1: {
if (%dial == ON) {
msg %dial_line2  ( $+ $chan $+ ) 3* $nick sets mode: +o $opnick
}
else {
halt
}
}

on *:DEOP:%dial_line1: {
if (%dial == ON) {
msg %dial_line2  ( $+ $chan $+ ) 3* $nick sets mode: -o $opnick
}
else {
halt
}
}

on *:VOICE:%dial_line1: {
if (%dial == ON) {
msg %dial_line2  ( $+ $chan $+ ) 3* $nick sets mode: +v $vnick
}
else {
halt
}
}

on *:DEVOICE:%dial_line1: {
if (%dial == ON) {
msg %dial_line2  ( $+ $chan $+ ) 3* $nick sets mode: -v $vnick
}
else {
halt
}
}

on *:BAN:%dial_line1: {
if (%dial == ON) {
msg %dial_line2  ( $+ $chan $+ ) 3* $nick sets mode: +b $bnick
}
else {
halt
}
}

on *:UNBAN:%dial_line1: {
if (%dial == ON) {
msg %dial_line2  ( $+ $chan $+ ) 3* $nick sets mode: -b $1-
}
else {
halt
}
}

on *:TOPIC:%dial_line1: {
if (%dial == ON) {
msg %dial_line2  ( $+ $chan $+ ) 3* $nick changes topic to: ' $+ $chan(%dial_line1).topic '
}
else {
halt
}
}

on *:MODE:%dial_line1: {
if (%dial == ON) {
msg %dial_line2  ( $+ $chan $+ ) 3* $nick sets mode: $1-
}
else {
halt
}
}

;----------------------------------

on *:TEXT:*:%dial_line2: {
if (%dial == ON) {
msg %dial_line1  ( $+ $chan $+ ) < $+ $nick $+ > $1-
}
else {
halt
}
}

on *:ACTION:*:%dial_line2: {
if (%dial == ON) {
msg %dial_line1  ( $+ $chan $+ ) 6* $1-
}
else {
halt
}
}

on *:JOIN:%dial_line2: {
if (%dial == ON) {
msg %dial_line1  ( $+ $chan $+ ) 3* $nick ( $+ $mask($address,3) $+ ) has joined %dial_line2
}
else {
halt
}
}

on *:PART:%dial_line2: {
if (%dial == ON) {
msg %dial_line1  ( $+ $chan $+ ) 3* $nick ( $+ $mask($address,3) $+ ) has left %dial_line2
}
else {
halt
}
}

on *:QUIT: {
if (%dial == ON) {
if ( $nick ison %dial_line2 ) {
msg %dial_line1  ( $+ $chan $+ ) 2* $nick has quit IRC 3( $+ $1- $+ )
}
else {
halt
}
}
}

on *:NICK: {
if (%dial == ON) {
if ($comchan($newnick,1) == %dial_line2) {
msg %dial_line1  ( $+ $chan $+ ) 3* $nick is known as $newnick
}
else {
halt
}
}
}

on *:KICK:%dial_line2: {
if (%dial == ON) {
msg %dial_line1  ( $+ $chan $+ ) 3* $knick was kicked by $nick ( $+ $2- $+ )
}
else {
halt
}
}

on *:OP:%dial_line2: {
if (%dial == ON) {
msg %dial_line1  ( $+ $chan $+ ) 3* $nick sets mode: +o $opnick
}
else {
halt
}
}

on *:DEOP:%dial_line2: {
if (%dial == ON) {
msg %dial_line1  ( $+ $chan $+ ) 3* $nick sets mode: -o $opnick
}
else {
halt
}
}

on *:VOICE:%dial_line2: {
if (%dial == ON) {
msg %dial_line1  ( $+ $chan $+ ) 3* $nick sets mode: +v $vnick
}
else {
halt
}
}

on *:DEVOICE:%dial_line2: {
if (%dial == ON) {
msg %dial_line1  ( $+ $chan $+ ) 3* $nick sets mode: -v $vnick
}
else {
halt
}
}

on *:BAN:%dial_line2: {
if (%dial == ON) {
msg %dial_line1  ( $+ $chan $+ ) 3* $nick sets mode: +b $bnick
}
else {
halt
}
}

on *:UNBAN:%dial_line2: {
if (%dial == ON) {
msg %dial_line1  ( $+ $chan $+ ) 3* $nick sets mode: -b $1-
}
else {
halt
}
}

on *:TOPIC:%dial_line2: {
if (%dial == ON) {
msg %dial_line1  ( $+ $chan $+ ) 3* $nick changes topic to: ' $+ $chan(%dial_line2).topic '
}
else {
halt
}
}

on *:MODE:%dial_line2: {
if (%dial == ON) {
msg %dial_line1  ( $+ $chan $+ ) 3* $nick sets mode: $1-
}
else {
halt
}
}

Comments

Sign in to comment.
MashhitDK   -  Jun 03, 2012
Just wanted to say thanks... am gonna try this out
 Respond  
Grant-   -  Nov 13, 2009
Yeah aLFx.
 Respond  
aLFx   -  Nov 13, 2009
where to put these code?in remote?
 Respond  
bluedragons   -  Mar 16, 2009
i will vote after my 7 days r up but this is a great snippet will come in handy for any one that knows a good snippet great job keep up the great work u rock
 Respond  
Callison1   -  May 27, 2007
Nice =D
 Respond  
CharltonJ   -  May 22, 2007
awesome Telephone :P, Good job Diddy ;)
 Respond  
xDaeMoN   -  Mar 30, 2005
Yes it is, because mIRC is multi-server capable now :)
 Respond  
Diddy   -  Mar 30, 2005
I got asked that by a friend of mine. I don\'t know if it\'s possible.. if it is, I will. :P
 Respond  
Relinsquish   -  Mar 30, 2005
Have you ever thought about making this multi-server friendly? :)
 Respond  
supergeo   -  Mar 30, 2005
Hmm pretty nice idea to have messaging like telephone calls.
 Respond  
Are you sure you want to unfollow this person?
Are you sure you want to delete this?
Click "Unsubscribe" to stop receiving notices pertaining to this post.
Click "Subscribe" to resume notices pertaining to this post.