Jump to content

Close Channel Window


general

Recommended Posts

There's no reason why it should be staying open, but your code is a bit yuck. The way you've written it will trigger the script if somebody types !joins or !parts. I'd use something like this instead:

 

on admin:text:!join ?*:#: join % $+ #$2
on admin:text:!part ?*:#: part % $+ #$2

Edited by hixxy
Link to comment
Share on other sites

hummmm

i checked all files throughly ..i have no such codes but only this one ....

on ^*:PART:#: {
  if ($nick == $me ) halt {
  msg $active $read(text\partmsgg.txt) }
}

but i dont think so ...this can be the reason to halt window after leaving the room...

wat do u say?

Link to comment
Share on other sites

It v ery well could be, did you disable it and see? Let me address a few things I see with this code here.

 

on ^*:PART:#: {
  if ($nick == $me ) halt {
  msg $active $read(text\partmsgg.txt) }
}

 

First of all, the ^ prefix means this event will trigger before any other part event in your mirc.

 

Second, your syntax is wrong. I tend to look at code like sentences.

 

if (this happens) || (this matches) { do this }

elseif (this matches) { do this }

 

 

you say:

 

if ($nick == $me) { halt } { msg $active $read(text.txt) }

 

I think what you want is:

 

{

if ($nick == $me) halt

msg $active $read(file.txt)

}

 

Now, msg only works in a channel. You are assuming $active is a channel? Maybe $chan(1)? Or is echo good enough for you?

But really, I would write it like this.

 

on ^!*:part:#:/echo $active $read(file.txt)


-or-

on ^!*:part:#:{
if ($chan(1)) msg $ifmatch $read(file.txt)
}

 

Check out the mirc help file for "Prefixes" it will tell you that ! is the same as if ($nick == $me) halt

Edited by Travis
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...