Check for flags on Q

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

Check for flags on Q

Postby Przemo » Sun Dec 14, 2008 7:25 pm

Well Hi,
I'd like to have have script that would check for flags on Q but I dunno how to write it :<
Script is actually needed to compile it with request script, if Bot stil will not have flags on Q in like 10 mins or smth will leave channel.
If somebody would script it I'd be really pleased :>
Greets, Przemo :)
Przemo
 

Re: Check for flags on Q

Postby StareX » Thu Dec 18, 2008 5:17 pm

for the script of chanlev
you need to write
!Qnet nick +/-flags

and for check who is in the chanlev type only !Qnet
and for chanflags and chanmodes too:
for the chanmode you type !chanmode mode
for the chanflags you type: !chanflags +/-modes
here ya go:

Code: Select all
on *:input:#:{ 
if ($1 == !Qnet) { msg Q chanlev # $2 $3 }
if ($1 == !chanmode) { msg Q chanmode # $2 $3 }
if ($1 == !chanflags) { msg Q chanflags # $2 }


have fun! ;)
I hope thats what you wanted.
StareX
 

Re: Check for flags on Q

Postby Przemo » Sat Dec 20, 2008 11:36 pm

lol starex, I didn't mean this think You have posted, I mean script that wil check if Bot that got requested to #somechan already got flags on Q, and it should be checked like 3 times in 9 mins (so after 3 mins first check, another 3 mins 2nd check and another check after total o 9 mins, if still no flags bot leaves #somechan) I hope You get me now :P
Przemo
 

Re: Check for flags on Q

Postby Cristian » Sun Dec 21, 2008 10:28 pm

This script starts to check for flags on join.

You are allowed to have X strikes (changeable), when checking for flags and you get 'no access', a message is sent to the development channel
You can set a channel of your choice, where the information about the strikes should go.

After the strikes, a final message is sent, and the bot will part the channel, it will not send any messages to the channels its on, only the development channel, if you wish it should do that, you have to edit the script.

I hope this is what you are looking for.

If you have any problems, please post them here.

Code: Select all
alias -l inifile { return file.ini }
alias -l developmentchannel { return #development_channel }
alias -l totalstrike { return 3 }

raw 366:& & *: {
  .checktimer $2
}
alias checktimer {
  if ($readini($inifile,react,$1) == $totalstrike) {
    if ($me ison $1) {
      echo -st .part $1
    }
    $+(.timer(checkflag.,$1)) off
    .remini $inifile react

    msg $developmentchannel Strike out on $+($chr(2),$1,$chr(2)) - I'm parting the channel.

    return
  }

  if (!$timer(checkflag. [ $+ [ $1 ] ])) {
    $+(.timer.checkflag.,$1) 1 300 checktimer $1
    .msg Q chanlev $1
  }
}
on *:NOTICE:*:?: {
  if ($nick == Q) {
    if (*You do not have sufficient access on* iswm $1-) {
      .writeini $inifile react $8 $calc($readini($inifile,react,$8)+1)
      msg $developmentchannel I have no flags on $+($chr(2),$8,$chr(2)) Strike: $+($chr(2),$readini($inifile,react,$8),$chr(2),/,$chr(2),$totalstrike,$chr(2))
    }
  }
}
Cristian
proof of advance
proof of advance
 
Posts: 282
Joined: Sun Nov 04, 2007 3:02 pm
Location: Denmark
Authnick: Sumsar

Re: Check for flags on Q

Postby Przemo » Sun Dec 21, 2008 10:36 pm

Yeah, it is what I wanted, but still I don't get what for is $inifile :P
Przemo
 

Re: Check for flags on Q

Postby Cristian » Sun Dec 21, 2008 10:43 pm

Its a file(alias) I'm using to store the channel and the reaction levels, it might done in another way, but thats how I did it.

Code: Select all
alias -l inifile { return file.ini }

-l means local, it can only be triggered from inside the script.
Cristian
proof of advance
proof of advance
 
Posts: 282
Joined: Sun Nov 04, 2007 3:02 pm
Location: Denmark
Authnick: Sumsar

Re: Check for flags on Q

Postby Przemo » Sun Dec 21, 2008 10:47 pm

Yeah, really nice script :)

Thank You much dude :D I know everything and gonna mod it a bit :P
Przemo
 


Return to Mirc Scripting Request

Who is online

Users browsing this forum: No registered users and 0 guests

cron