Channel is closed

Do you have script in mind but no ability to make it, type in what it should do, and you might be lucky.

Channel is closed

Postby Futz0r » Mon Jul 20, 2009 3:30 pm

Hello there:)

what I want and have made are:
my channel is closed, that good people can still join my channel - but the kicker being the bot because the bot does not know them hostname. and if the bot know them, so give it up, etc.:) - hope that in understanding it:)

and has been started with nothing - but now I'm not the best for this.

Code: Select all
on 10:text:*:#Futz0r.dk: {
  if ($1 == !) {
  }
  if ($2 == open) {
    if (*i* iswm $chan(%que.channel).mode) {
           .msg $chan Channel is now open for Users to join.
    }
    else {
      .msg $chan Channel is allready open for users to join.
    }
  }
  if ($2 == close) {
    if (*i* iswm $chan(%que.channel).mode) {
      .msg $chan Channel is allready closed!
    }
    else {
      .msg $chan %logo Channel is now Closed for Users to join. %logo
      .kick $nick %logo Channel is now Closed for Users to join. %logo Want a invite? so pm Futz0r %logo
    }
  }
}
and who can see, it is not particularly good here :p - but it is a good start on something :P :p
Futz0r
 

Re: Channel is closed

Postby Cristian » Mon Jul 20, 2009 5:13 pm

it sounds like the known function from Q. Where you will be kicked and banned, if Q doesn't know you.

You have to figure out some database for the users who are allowed to join your channel.

perhaps something like

Code: Select all
on @*:JOIN:#futz0r.dk: {
   var %hostname = $address($nick,2)
   if (!$readini(userlist.ini,$chan,%hostname)) {
      .mode $chan +b %hostname
           .kick $chan %user <reason>
   }
}
Cristian
proof of advance
proof of advance
 
Posts: 282
Joined: Sun Nov 04, 2007 3:02 pm
Location: Denmark
Authnick: Sumsar

Re: Channel is closed

Postby Futz0r » Mon Jul 20, 2009 5:39 pm

Code: Select all
on 10:TEXT:!adduser:#Futz0r.dk: {
  writeini userlist.ini $chan $address($3,2) $2
  msg # %logo Brugeren: $3 er blevet added i databasen som $2 %logo
}

on 10:TEXT:!deluser &:#: {
  if ($readini(userlist.ini,$chan,$address($nick,2)) {
    if (!$readini(userlist.ini,$chan,$address($2,2))) {
      msg # %logo Brugeren er ikke i databasen! %logo
    }
    if ($readini(userlist.ini,$chan,$address($2,2))) {
      if ($2 ison #) {
        remini userlist.ini $chan $address($2,2)
        msg # %logo Brugeren: $2 er blevet fjernet fra databasen %logo
      }
      elseif ($2 !ison #) && ($readini(userlist.ini,$chan,$address($2,2))) {
        remini userlist.ini $chan $address($2,2)
        msg # %logo Brugeren: $2 er blevet fjernet fra databasen %logo
      }
    }
  }
}

on 10:TEXT:!userlist *:#: {
  if ($readini(userlist.ini,$chan,$address($nick,2)) {
    notice $nick %logo Admins %logo
    var %i = 1
    while ($ini(userlist,admins,%i)) {
      $readini(userlist.ini)
    .timer 1 %i .notice $nick %logo  $+ %i $+ : %logo inc %i }
  }
}


i'm not sure it can used - but i think my !userlist is whong - or need somthing
Futz0r
 

Re: Channel is closed

Postby zNigel- » Mon Jul 20, 2009 6:06 pm

Futz0r wrote:
Code: Select all
on 10:TEXT:!adduser:#Futz0r.dk: {
  writeini userlist.ini $chan $address($3,2) $2
  msg # %logo Brugeren: $3 er blevet added i databasen som $2 %logo
}

on 10:TEXT:!deluser &:#: {
  if ($readini(userlist.ini,$chan,$address($nick,2)) {
    if (!$readini(userlist.ini,$chan,$address($2,2))) {
      msg # %logo Brugeren er ikke i databasen! %logo
    }
    if ($readini(userlist.ini,$chan,$address($2,2))) {
      if ($2 ison #) {
        remini userlist.ini $chan $address($2,2)
        msg # %logo Brugeren: $2 er blevet fjernet fra databasen %logo
      }
      elseif ($2 !ison #) && ($readini(userlist.ini,$chan,$address($2,2))) {
        remini userlist.ini $chan $address($2,2)
        msg # %logo Brugeren: $2 er blevet fjernet fra databasen %logo
      }
    }
  }
}

on 10:TEXT:!userlist *:#: {
  if ($readini(userlist.ini,$chan,$address($nick,2)) {
    notice $nick %logo Admins %logo
    var %i = 1
    while ($ini(userlist,admins,%i)) {
      $readini(userlist.ini)
    .timer 1 %i .notice $nick %logo  $+ %i $+ : %logo inc %i }
  }
}


i'm not sure it can used - but i think my !userlist is whong - or need somthing



Code: Select all
  on 10:text:!userlist:#:  {
    if ($readini(userlist.ini,Admins,$address($nick,2))) {
      var %topic = Admins

      putnotice $nick Global userlist:
      var %x = 1
      while ($ini(userlist.ini,%topic,%x)) {
        var %h = $v1, %r = $readini(userlist.ini,%topic,%h)
        putnotice $nick Host: %h - Access: %r
        inc %x
      }
      putnotice $nick End of Global userlist.
    }
    else { putnotice $nick You have no access to this command. | halt }
  }


That's what my userlist looks like :)
zNigel-
 

Re: Channel is closed

Postby Futz0r » Mon Jul 20, 2009 6:12 pm

i'm lost right now :? :? :?
Futz0r
 

Re: Channel is closed

Postby Futz0r » Tue Jul 21, 2009 1:53 am

Just an update! :) - So far, I come pt. with some help from people.

and now I just missing (if not on the channel, so I want See also him, although he is not - and I am not good (for it is something with $IAL)) and I can not - but Therefore, I have you:)

but now seems to have gone well with the script:)
Thanks to Sumsar (in order to help me with the script)
Thanks to zNigel (For borrowed his adminscanner:) )
Thanks to alfnbabz (To correct the script so it works 100%)

Code: Select all
on *:JOIN:#Futz0r.dk: {
  var %hostname = $address($nick,2)
  if (!$readini(userlist.ini,$chan,%hostname) && %adminscan == on) {
     ban -u300 $chan %hostname
    .kick $chan $nick Invite only channel ( $+ $kc $+ ) | msg $nick You have been kicked from #Futz0r.dk , if you want an invite : /msg Futz0r invite #Futz0r.dk and wait for invite approval
      }
}

on *:text:!invite*:#: {
  if ($readini(userlist.ini,$chan,$address($nick,2)) == ADMIN) {
    if (!$2) { notice $nick Syntax: $1 on/off/status/add/del/list }
    elseif ($2 == on) {
      if (%adminscan == on) { notice $nick Only-invite is already enabled.
      }
      else { set %adminscan on | notice $nick Only-invite is now enabled.
      }
    }
    elseif ($2 == off) {
      if (%adminscan == off) { notice $nick Only-invite is already disabled.
      }
      else { set %adminscan off | notice $nick Only-invite is now disabled. }
    }
    elseif ($2 == status) {
      if (%adminscan == on) { notice $nick Only-invite is currently: Enabled }
      else { notice $nick Only-invite is currently: Disabled }
    }
    elseif ($2 == add) {
      if (!$3) { notice $nick Syntax: $1 $2 <nick> }
      if  ($readini(userlist.ini,$chan,$address($3,2)) == INVITE) { notice $nick $3 is already an the INVITE list. }
      else { writeini userlist.ini $chan $address($3,2) INVITE | notice $nick Done. Added $3 to Only-invite list. }
    }
    elseif ($2 == del) {
      if (!$3) { notice $nick Syntax: $1 $2 <nick|hostname> }
      var %adminhost = $address($3,2)
      if (*!*@* iswm $3) && ($left($3,4) == *!*@) { var %adminhost = $3 }
      if  (!$readini(userlist.ini,$chan,%adminhost)) { notice $nick %adminhost is not in Only-invite list. }
      else {   
      remini userlist.ini $chan %adminhost | notice $nick Done. Removed %adminhost from Only-invite list. }
    }
    elseif ($2 == list) {
      notice $nick Only-invite admins - Entries: $iif($ini(userlist.ini,$chan,0),$v1,0)
      var %i = 1
      while (%i <= $ini(userlist.ini,$chan,0)) {
        var %x = $ini(userlist.ini,$chan,%i)
        var %lvl = $readini(userlist.ini,$chan,%i)
        var %list = $addtok( $+ %x  $+ $chr(44),%list,32)
        inc %i
        notice $nick %x
      }
      else { halt
      }
    }
  }
}

alias -l kc {
  if (!%kicks) { set %kicks 0 }
  inc %kicks
  return %kicks
}
Futz0r
 

Re: Channel is closed

Postby zNigel- » Fri Jul 31, 2009 4:24 pm

Futz0r wrote:Just an update! :) - So far, I come pt. with some help from people.

and now I just missing (if not on the channel, so I want See also him, although he is not - and I am not good (for it is something with $IAL)) and I can not - but Therefore, I have you:)

but now seems to have gone well with the script:)
Thanks to Sumsar (in order to help me with the script)
Thanks to zNigel (For borrowed his adminscanner:) )
Thanks to alfnbabz (To correct the script so it works 100%)

Code: Select all
on *:JOIN:#Futz0r.dk: {
  var %hostname = $address($nick,2)
  if (!$readini(userlist.ini,$chan,%hostname) && %adminscan == on) {
     ban -u300 $chan %hostname
    .kick $chan $nick Invite only channel ( $+ $kc $+ ) | msg $nick You have been kicked from #Futz0r.dk , if you want an invite : /msg Futz0r invite #Futz0r.dk and wait for invite approval
      }
}

on *:text:!invite*:#: {
  if ($readini(userlist.ini,$chan,$address($nick,2)) == ADMIN) {
    if (!$2) { notice $nick Syntax: $1 on/off/status/add/del/list }
    elseif ($2 == on) {
      if (%adminscan == on) { notice $nick Only-invite is already enabled.
      }
      else { set %adminscan on | notice $nick Only-invite is now enabled.
      }
    }
    elseif ($2 == off) {
      if (%adminscan == off) { notice $nick Only-invite is already disabled.
      }
      else { set %adminscan off | notice $nick Only-invite is now disabled. }
    }
    elseif ($2 == status) {
      if (%adminscan == on) { notice $nick Only-invite is currently: Enabled }
      else { notice $nick Only-invite is currently: Disabled }
    }
    elseif ($2 == add) {
      if (!$3) { notice $nick Syntax: $1 $2 <nick> }
      if  ($readini(userlist.ini,$chan,$address($3,2)) == INVITE) { notice $nick $3 is already an the INVITE list. }
      else { writeini userlist.ini $chan $address($3,2) INVITE | notice $nick Done. Added $3 to Only-invite list. }
    }
    elseif ($2 == del) {
      if (!$3) { notice $nick Syntax: $1 $2 <nick|hostname> }
      var %adminhost = $address($3,2)
      if (*!*@* iswm $3) && ($left($3,4) == *!*@) { var %adminhost = $3 }
      if  (!$readini(userlist.ini,$chan,%adminhost)) { notice $nick %adminhost is not in Only-invite list. }
      else {   
      remini userlist.ini $chan %adminhost | notice $nick Done. Removed %adminhost from Only-invite list. }
    }
    elseif ($2 == list) {
      notice $nick Only-invite admins - Entries: $iif($ini(userlist.ini,$chan,0),$v1,0)
      var %i = 1
      while (%i <= $ini(userlist.ini,$chan,0)) {
        var %x = $ini(userlist.ini,$chan,%i)
        var %lvl = $readini(userlist.ini,$chan,%i)
        var %list = $addtok( $+ %x  $+ $chr(44),%list,32)
        inc %i
        notice $nick %x
      }
      else { halt
      }
    }
  }
}

alias -l kc {
  if (!%kicks) { set %kicks 0 }
  inc %kicks
  return %kicks
}


Lol it's fully copied from my adminscanner ;x Also you should've changed the variables ^^
zNigel-
 

Re: Channel is closed

Postby alfnbabz » Sun Aug 16, 2009 7:49 pm

zNigel wrote:Lol it's fully copied from my adminscanner ;x Also you should've changed the variables ^^


So? It works, and he doesn't hide the fact that its based on your script. =)
alfnbabz
 


Return to Mirc Scripting Request

Who is online

Users browsing this forum: No registered users and 1 guest

cron