mIRC Home    About    Download    Register    News    Help

Print Thread
Page 2 of 2 1 2
Joined: Dec 2002
Posts: 2,962
S
Hoopy frood
Offline
Hoopy frood
S
Joined: Dec 2002
Posts: 2,962
The speed of your computer is irrelevant. If you have an on exit event mIRC will not close until that event has finished processing. So if you use /hsave inside the event it won't close until the hash table has finished being written to the file.


Spelling mistakes, grammatical errors, and stupid comments are intentional.
Wims #206548 17/11/08 01:03 PM
Joined: Jan 2007
Posts: 1,156
D
Hoopy frood
Offline
Hoopy frood
D
Joined: Jan 2007
Posts: 1,156
Well that may be true, it can hardly be counted on that $hget(table,1).item is always going to return the exact item name you are looking for. It is not solid enough to base your code on. I require solutions that are 100% accurate, not just accurate if some conditions happen to be met.

Joined: Jan 2007
Posts: 1,156
D
Hoopy frood
Offline
Hoopy frood
D
Joined: Jan 2007
Posts: 1,156
Yes save on disconnect, on exit and on me:*:quit:{.

Joined: Jul 2006
Posts: 4,149
W
Hoopy frood
Offline
Hoopy frood
W
Joined: Jul 2006
Posts: 4,149
What ? I'm only saying that $hget(name,1).item will always return the last added item, I never said it will return the item name you're looking for


#mircscripting @ irc.swiftirc.net == the best mIRC help channel
Joined: Feb 2003
Posts: 3,432
S
sparta Offline OP
Hoopy frood
OP Offline
Hoopy frood
S
Joined: Feb 2003
Posts: 3,432
Thank you smile instead of start a new post i ask here wink i know goto aren't the best to use, but what if i have a part of a alias i want to be triggered if the nick is in a list. What else could i use?
Code:
alias test {
  if (%var >= 3) && (%f != 1) { do stuff }

  ;------ skip everything down to start if $cexcctcp = $true
  if ($cexcctcp == $true) { goto start }
  ;------ skip everything down to start if $cexcctcp = $true

  if (%f == 1) { return }
  if ($readini(test.ini) == Disabled) { do stuff }
  elseif ($readini(test.ini) == High) { do stuff }
  elseif ($readini(test.ini) == Normal) { do stuff }
  :start
  echo -a rest of code here
}


if ($me != tired) { return } | else { echo -a Get a pot of coffee now $+($me,.) }
Joined: Dec 2002
Posts: 2,962
S
Hoopy frood
Offline
Hoopy frood
S
Joined: Dec 2002
Posts: 2,962
Code:
if $cexcctcp != $true {
  ; Code that was before :start
}
; Code after :start


There really wasn't any need to ask that here. You should at least try and figure things out for yourself.


Spelling mistakes, grammatical errors, and stupid comments are intentional.
Joined: Feb 2003
Posts: 3,432
S
sparta Offline OP
Hoopy frood
OP Offline
Hoopy frood
S
Joined: Feb 2003
Posts: 3,432
well, didn't work now, and didn't work when i asked. so that wont do what i asked..


if ($me != tired) { return } | else { echo -a Get a pot of coffee now $+($me,.) }
Joined: Dec 2002
Posts: 2,962
S
Hoopy frood
Offline
Hoopy frood
S
Joined: Dec 2002
Posts: 2,962
Was your question at all related to the code you gave and comments it includes? If not then you need to specify what "list" you're referring to, and either way the answer is the same: use an if statement if a peice of code should only be executed when a certain condition is met.


Spelling mistakes, grammatical errors, and stupid comments are intentional.
Joined: Feb 2003
Posts: 3,432
S
sparta Offline OP
Hoopy frood
OP Offline
Hoopy frood
S
Joined: Feb 2003
Posts: 3,432
This is how the code looks like:
Code:
alias test {
  if ($cexcctcp == $true) { goto start }
  if ($readini(settings.ini,protection,ctcp) == Disabled) { goto start }
  inc -u5 $+(%, no., $nick) | if ($($+(%, no., $nick), 2) >= 3) { echo -a CTCP flood detected from: $+($nick,$chr(44)) %ctcpflood ctcp's in %ctcpftime seconds. $+($chr(40),ignored,$chr(41)) | return }
  :start
  echo -> rest of the code here
}

Notice i need it to "goto start" if $cexcctcp = $true, and if the $readini(settings.ini,protection,ctcp) = disabled, i removed some code and added some, so this don't match the one i pasted befor, and i did try the code you suggested, but had no luck with it then, and no luck with in on this one ether so then i asked.


if ($me != tired) { return } | else { echo -a Get a pot of coffee now $+($me,.) }
Joined: Aug 2004
Posts: 7,252
R
Hoopy frood
Offline
Hoopy frood
R
Joined: Aug 2004
Posts: 7,252
Code:
alias test {
  inc -u5 $+(%, no., $nick)
  if ($($+(%, no., $nick), 2) >= 3) {
    echo -a CTCP flood detected from: $+($nick,$chr(44)) %ctcpflood ctcp's in %ctcpftime seconds. $+($chr(40),ignored,$chr(41))
  }
  if ($cexcctcp == $true) || ($readini(settings.ini,protection,ctcp) == Disabled) { 
    echo -> rest of the code here
  }
}


Simple matter of placing your commands/if statements in a slightly different order.

Joined: Apr 2018
Posts: 24
T
Ameglian cow
Offline
Ameglian cow
T
Joined: Apr 2018
Posts: 24
Here in bad.word where is the code to give ban ?

Page 2 of 2 1 2

Link Copied to Clipboard