mIRC Home    About    Download    Register    News    Help

Print Thread
Help how to save #181442 23/07/07 05:58 PM
Joined: Aug 2006
Posts: 469
G
Garou Offline OP
Fjord artisan
OP Offline
Fjord artisan
G
Joined: Aug 2006
Posts: 469
I want to save, open, load and run bad.name.hsh from mirc/sys dir not from mirc folder?

Code:
 

raw 311:*:{
  if (%name != off) && ($nick !isop #chat) {
    var %a = 1, %b = $numtok($3-,32)
    while %a <= %b {
      if $hget(bad.name,$gettok($3-,%b,32)) {
        ban -ku60 #chat $2 2 14Offensive IrcName Detected
        %a = %b
      }
      inc %a
    }
    return $regsubex($1-,/\b( $+ %name $+ )\b/gi,$str(*,$len(\t)))
  }
  haltdef
}
on *:start:{
  if !$hget(bad.name) { .hmake bad.name 10 }
  if $exists(bad.name.hsh) { .hload bad.name bad.name.hsh }
}
on *:exit:{
  .hsave -o bad.name bad.name.hsh
}
on *:disconnect:{
  .hsave -o bad.name bad.name.hsh
}
menu status {
-
Add Bad IrcName
.Add Bad IrcName : bad.name $?= "Add bad name" | echo $asctime([HH:nn]) * 4Bad IrcName Added.
.-
.Remove Bad IrcName : bad.name $?= "Remove bad name" | echo $asctime([HH:nn]) * 4Bad IrcName Removed.
.-
.View Bad IrcName List: run bad.name.hsh
.-
.Clear Bad IrcName List: .hfree bad.name | $iif($exists(bad.name.hsh),remove bad.name.hsh)
}
alias bad.name {
  if !$1 { .notice $nick No word specified }
  else { .hadd -m bad.name $1 $iif($hget(bad.name,$1),$false,$true)  }
} 



Last edited by Garou; 23/07/07 06:03 PM.
Re: Help on dir [Re: Garou] #181443 23/07/07 06:04 PM
Joined: Dec 2002
Posts: 3,547
S
SladeKraven Offline
Hoopy frood
Offline
Hoopy frood
S
Joined: Dec 2002
Posts: 3,547
Code:
if $exists($mircdirSys\bad.name.hsh)


/help File and Directory Identifiers

Re: Help how to save [Re: Garou] #181444 23/07/07 06:15 PM
Joined: Aug 2005
Posts: 525
S
schaefer31 Offline
Fjord artisan
Offline
Fjord artisan
S
Joined: Aug 2005
Posts: 525
How many times are you going to ask this question? I believe this is the 3rd time in the last 30 days, and unfortunately the answer still hasn't changed.

Re: Help how to save [Re: schaefer31] #181445 23/07/07 06:23 PM
Joined: Aug 2006
Posts: 469
G
Garou Offline OP
Fjord artisan
OP Offline
Fjord artisan
G
Joined: Aug 2006
Posts: 469
Well sorry but I lost many scripts in my last forced format so I have to update many of them again.
I added this but the run wont open?

on *:start:{
if (!$isdir($mircdirsys)) mkdir $qt($mircdirsys)
if !$hget(name) { .hmake name 10 }
if $exists($mircdirSys\bad.name.hsh) { .hload bad.name $mircdirsys\bad.name.hsh }
}

Re: Help how to save [Re: Garou] #181446 23/07/07 06:25 PM
Joined: Dec 2002
Posts: 3,547
S
SladeKraven Offline
Hoopy frood
Offline
Hoopy frood
S
Joined: Dec 2002
Posts: 3,547
Code:
if !$hget(name) { .hmake name 10 }


Should be:

Code:
if !$hget(bad.name) { .hmake bad.name 10 }


The hash table names aren't the same.