Jump to content

Would It Be Possible


Guest Johnson

Recommended Posts

:oops: I dont know if this is a silly question but iv just got to ask it ... when your script leaves i.e disconnected from the server or whatever ? is there a way of putting a sound code in your script to alert you to this ? ... For example people can page me when im not at my pc but close by .. I have plenty of wav sounds if its possible :D

 

on *:TEXT:*!page*:#:{ 
  /set -u3 %smsg $2-
  write paging.txt $nick - %smsg
  { splay Page.wav }
  msg # $nick Is Paging you 
}

Edited by Lynx
Link to comment
Share on other sites

yep, it's heaps do-able...

if you refer to the help file and look at "on disconnect", you can work it out.

Though here's the code...

on *:DISCONNECT: { splay Page.wav }

 

:lmaojump: Thanks TGK to be honest with you I never seem to look at help in mirc ... plus most times I dont understand it ... also I did this and put one of these * to many lol

 

On*:Disconnect:* { spray disconnect.wav }

 

The reson I put the extra * in was ... I have this code for sound and was looking at that :D

 

on *:Join:*:{ splay join.wav }
on *:Part:*:{ splay leave.wav }

 

and if you notice it has an extra * i.e. on*:join:* ... but im learning with help from people like you ... again TGK Thankyou Very Much

 

 

 

 

Link to comment
Share on other sites

Guest Travis

If you use a socket to connect to the server you won't really have a disconnect event. You would need to check if the socket closes and if it does do your /splay sound.wav.

Link to comment
Share on other sites

If you use a socket to connect to the server you won't really have a disconnect event. You would need to check if the socket closes and if it does do your /splay sound.wav.

 

 

:lmaojump: Hi travis mate ... it works fine ... its a funny old world i hadnt put that code into my script before i was disconnected from the server and it yelled at me loud and clear :D The only other thing is when it does disconnect for whatever reason it doesnt autojoin the room ? i have to do that manually :(

Link to comment
Share on other sites

Look in the mIRC options on that. If not then its a simple fix... let me know and i'll help you out.

 

iv gone to mirc Options and IRC/options ... iv ticked rejoin channel when kicked /rejoin channel on connect / keep channel open ... but it still doent rejoin :(

Link to comment
Share on other sites

Guest Travis

mIRC Options:

 

Connect > Options >

 

  • Reconnect on Disconnect

 

Check For Timed Out Connection (this one can be a pain, it may dc you thinking your connection timed out)

 

 

Retry Button:

 

  • Enable Connect Retry

 

Set settings as you wish.

 

IRC >

 

  • Rejoin Channels on Connect

 

Keep Channels Open

 

With all of these selected it should reconnect you if you are using basic mirc to connect to the server and rooms. Rooms will stay open and you should rejoin the rooms on re-connect.

 

Sometimes when we have special ways to connect to the server mIRC doesn;t automatically rejoin the rooms well.

 

On *:Disconnect:{

 

$chan(0) returns total number of channels. Then a while loop will give you names. $chan(1) etc. So you can store all rooms you were in, reconnect using your reconnect alias, then join those rooms. Here is a sample while loop for this sort of situation. Note, seperate the rooms names with a comma so I can utilize the multi-room join command. /join room1,room2,room3

 

 

on *:disconnect:{
var %cx = $chan(0) | while (%cx) {
%channels = $addtok(%channels,$chan(%cx),44)
dec %cx
}
;Command to connect to your server goes here.

;Now you either set the rooms as a global variable and whatever raw or SNOTICE tells you you are connected, or the on *:connect event, is where you /join %channels

;Or you can use a timer but I prefer to be positive Im connected before joining rooms.
;I will use the Connect event. SO I need to set a variable telling the connect event that I just dc'd.

set -u5 %dc $server

}

on *:connect:{
if (%dc == $server) {
join %channels
unset %dc %channels

}

}

 

This is the basic idea, without testing it on your server and with your connection I cannot be sure. But this is pretty much how you do it manually.

Edited by Travis
Link to comment
Share on other sites

Thanks Travis .. iv done everything you have told me to do i.e >>>

 

mIRC Options:

Connect > Options >

Reconnect on Disconnect

Check For Timed Out Connection (this one can be a pain, it may dc you thinking your connection timed out)

Retry Button:

Enable Connect Retry

Set settings as you wish.

 

IRC >

Rejoin Channels on Connect

Keep Channels Open

 

I will let you know if they that helps me 1st ^^^^^^^^^^

 

I use my script in sparkpea ... but i will keep that code if you dont mind and try it out late .. again as i always say Thankyou for your help on this one :D

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...