mIRC Home    About    Download    Register    News    Help

Print Thread
Joined: May 2005
Posts: 449
Fjord artisan
OP Offline
Fjord artisan
Joined: May 2005
Posts: 449
Hi,

I'm trying to get this to work so that when someone joins my server from the Java client and gets a Guest#### nick, it sets a timer for two minutes and then gives them a random nick read from a text file. For the script, the nick will be:

$gettok($remove($read(phobia.txt),-),1,32)

I tried this, but it isn't working:
Code:
on 1:JOIN:#: {
    if (Guest* isin $nick) && ($network == BlakeNET) {
    timernick 1 120 { operserv set superadmin on | operserv svsnick $nick $gettok($remove($read(phobia.txt),-),1,32) }
  }
}

Joined: Oct 2005
Posts: 1,741
G
Hoopy frood
Offline
Hoopy frood
G
Joined: Oct 2005
Posts: 1,741
"isin" should be "iswm".

-genius_at_work

Joined: May 2005
Posts: 449
Fjord artisan
OP Offline
Fjord artisan
Joined: May 2005
Posts: 449
Thanks. The timer is being set, but I had a problem where OperServ was sending me a notice saying "Only Super-Admins can use this command. I changed the code to the following, but now it's immediately changing the nick.
Code:
on *:JOIN:#: {
    if (Guest* iswm $nick) && ($network == BlakeNET) {
    operserv set superadmin on    
    timernick 1 120 { 
      operserv svsnick $nick $gettok($remove($read(phobia.txt),-),1,32) 
    }
  }
}

Joined: Mar 2005
Posts: 420
X
Fjord artisan
Offline
Fjord artisan
X
Joined: Mar 2005
Posts: 420
Code:
 on *:JOIN:#: {
    if (Guest* iswm $nick) && ($network == BlakeNET) {
    operserv set superadmin on    
    .timernick 1 120 operserv svsnick $nick $gettok($remove($read(phobia.txt),-),1,32)
  }
} 


If you have a plastic floor runner over your tiles, then you're one Hella Pinoy!
Joined: May 2005
Posts: 449
Fjord artisan
OP Offline
Fjord artisan
Joined: May 2005
Posts: 449
Thanks, that works. smile

Joined: May 2005
Posts: 449
Fjord artisan
OP Offline
Fjord artisan
Joined: May 2005
Posts: 449
Actually, I'm having a problem with this code. If I use:
Code:
msg botserv say #chat $read(phobia.txt,w, $newnick*)

it seems to read every phobia in the file, but if I take out the *, it doesn't tell botserv to say anything after the channel name.

Last edited by bwr30060; 06/04/06 05:42 PM.
Joined: Sep 2003
Posts: 4,230
D
Hoopy frood
Offline
Hoopy frood
D
Joined: Sep 2003
Posts: 4,230
Without actually checking that is the likely code you needed in the first place...

Code:
on 1:JOIN:#:{
    if (Guest* isin $nick) && ($network == BlakeNET) {
      .timer.rename. $+ $nick 1 120 if ( $nick ison $chan ) $({,) operserv set superadmin on $(|,) operserv svsnick $nick $!gettok($remove($read(phobia.txt),-),1,32) $(},)
  }
}


a timer cant have { } & | in it,becuase mirc evaluates them as open and close command block & command seperator, so you tel it to not evaluate thm using $( ,), this allows u multiple commands, i added an IF check on the $nick still being in the channel as well, incase they changed nicks themselfs

your second problem is likely just this

msg botserv say #chat $read(phobia.txt,w, $newnick $+ *)

you cant attach a * to the end of $newnick by just adding it, it makes mirc try and find a identifier called $newnick* and that is $null, which likely makes the wildcard match everyline

Joined: May 2006
Posts: 32
R
Ameglian cow
Offline
Ameglian cow
R
Joined: May 2006
Posts: 32
is there any way to get this to work on Quakenet?

i too have a problem similar, i have the option of joining my chat from the website forum with a java client.

at first poeple were all using the default Guest??
so i changed the nick box, and removed the nicks... and left it blank, hoping they would be forced into typing a nick in.
now they just join with an empty box and the server gives them a anon205, anon144 etc?

i notices this script and thought it would be perfect smile
but on trying it, making the change from guest to anon
i get this error in the status window
OPERSERV Unknown command

any ideas how to make this work for me please smile


Link Copied to Clipboard