BNC-script

Paste Your code(s) here, and state your problem.

BNC-script

Postby Futz0r » Mon Mar 29, 2010 9:06 pm

I'm missing a script that checks if the person is on atleast 4 channels

so i hope you can help me


Code: Select all
; set %debug990 1 
; unset %debug990

on *:TEXT:^bnc*:#pracc.bnc:{ 
  if (!%spam) {
    set -u30 %spam 1
    if ($2 == $null) {
      msg $chan %logo Wrong Syntax in: < $+ $1- $+ > %logo The syntax is ^bnc <Your Ident> %logo
    }
    if ($lines(idents.txt) >= %totalusers) {
      msg $chan %logo Sorry, no more free slots %logo
      return
    }
    if ($2) {
      if (%debug990 == 1) {
        echo -st $nick %logo Requested a bnc, checking requirements. %logo
      }
      set %ident $2
      set %chan $chan
      .who $nick n%nat,990
    }
  }
}
raw 354:*: {
  if ($2 == 990) {
    if ($4 != 0) {
      CreateBnc $3 %ident
      unset %ident
      if (%debug990 == 1) {
        echo -st $3 is authed as $4 $+ .
      }
    } 
    else {
      if (%debug990 == 1) {
        echo -st $3 is not authed.
      }
    }
  }
}
alias -l CreateBnc {
  set %br $lines(idents.txt)
  set %password $remove($($str($!rand(a,z) $+ $chr(32), 3),2),$chr(32)) $+ $remove($($str($!rand(0,9) $+ $chr(32), 2),2),$chr(32)) $+ $remove($($str($!rand(a,z) $+ $chr(32), 3),2),$chr(32))
  set %bnctojoin $2         
  write idents.txt $2         
  sbnc adduser $2 %password
  msg %chan %logo Next request is in 30seconds %logo
  timer 1 30 msg %chan %logo Requesting is now on again %logo
  sbnc simul $2 sbnc set realname 5]14:5[12 BNC by #pracc.sca 5]14:5[12
  sbnc simul $2 join &partyline
  sbnc simul $2 sbnc set server de.quakenet.org 6669
  timer 1 4 msg $1 %logo You have been added with ident: $3 - and password: %password %logo
  timer 1 5 msg $1 %logo The hostname of the server is: bnc.quickbnc.dk - port: 6008 %logo
  timer 1 6 msg $1 %logo For quickconnect, type: /server bnc.quickbnc.dk:6008 %password -i $3 $3 $+ ^ $+($2,@Pracc.bnc) $3 %logo
  timer 1 7 msg $1 %logo Remember to idle on #pracc.sca !! %logo
  timer 1 8 msg Q settopic #pracc.bnc 4,1«0,1•4,1»15,1 BNC-Status: $lines(idents.txt) $+ / $+ 100 slots 4,1«0,1•4,1»15,1 sBNCServ14: 3,1Online 4,1«0,1•4,1»15,1 Want a BNC ? 4,1«0,1•4,1»15,1 Read !Commands 4,1«0,1•4,1»15,1
  unset %password
  if (%debug990 == 1) {

    echo -st Creating bnc for $1 alias ident $2
  }
}

Futz0r
 

Re: BNC-script

Postby PuNkTuReD » Thu Apr 01, 2010 2:16 am

idk if the raws n the server you are on are the same as the server i use
but this might help

all the raws are to stop the whois showing.

Code: Select all
;
; USAGE
; /totchans <nick>
;
alias totchans { set %totchans TRUE | whois $$1 }
raw 301:*: { if (%totchans) { haltdef } }
raw 307:*: { if (%totchans) { haltdef } }
raw 311:*: { if (%totchans) { haltdef } }
raw 312:*: { if (%totchans) { haltdef } }
raw 313:*: { if (%totchans) { haltdef } }
raw 314:*: { if (%totchans) { haltdef } }
raw 317:*: { if (%totchans) { haltdef } }
raw 318:*: { if (%totchans) { unset %totchans | haltdef } }
raw 319:*: { if (%totchans) { totchans2 $2 $numtok($3-,32) | haltdef } }
raw 320:*: { if (%totchans) { haltdef } }
raw 379:*: { if (%totchans) { haltdef } }
raw 378:*: { if (%totchans) { haltdef } }
alias totchans2 {
  if ($$2 >= 4) {
    ;
    ; HERE IS WHERE YOUR CODE GOES IF THE USER IS ON 4 OR MORE CHANNELS
    ;
    echo -a $$1 is on $$2 channels. Which is >= 4.
    ;
    ; HERE IS WHERE YOUR CODE GOES IF THE USER IS ON 4 OR MORE CHANNELS
    ;
  }
}
PuNkTuReD
 

Re: BNC-script

Postby Futz0r » Thu Apr 01, 2010 3:13 am

Hi and thx :)


i'm on Quakenet.org - but i'll use this one :)
Futz0r
 


Return to Mirc Scripting Help

Who is online

Users browsing this forum: No registered users and 0 guests

cron