mIRC Home    About    Download    Register    News    Help

Print Thread
#184484 29/08/07 06:00 PM
Joined: Aug 2007
Posts: 41
P
Panic Offline OP
Ameglian cow
OP Offline
Ameglian cow
P
Joined: Aug 2007
Posts: 41
Well i need a script making my bot is set to auto join and i want so when i enter a channel that someone has invited my bot to it and if i don't want to the bot to auto join that channel anymore i want if Panic and trollman118 say !stopjoin in that channel we don't want the bot to join anymore it will say the bot called CrazyMan in the channel I will not longer join this room on invite anymore! and leave the channel and never join the channel on invite again i know this can be done because a friend of mine has done it but he won't give me the script this script will be put in my bot

Thank you so much if you can do this!

Thank you
Panic
ctcwcu head


CrazyMan IRC Bot Admin
IRC UnGoWa Support
NeoBlab Server-Admin
Chat Operator
Joined: Aug 2004
Posts: 7,252
R
Hoopy frood
Offline
Hoopy frood
R
Joined: Aug 2004
Posts: 7,252
While this isn't exactly what you're asking for, while I, and probably others, are working on your request, temporarily you might find my Auto-Part snippet useful.

Joined: Aug 2005
Posts: 1,052
L
Hoopy frood
Offline
Hoopy frood
L
Joined: Aug 2005
Posts: 1,052
Originally Posted By: Panic
Well i need a script making my bot is set to auto join and i want so when i enter a channel that someone has invited my bot to it and if i don't want to the bot to auto join that channel anymore i want if Panic and trollman118 say !stopjoin in that channel we don't want the bot to join anymore it will say the bot called CrazyMan in the channel I will not longer join this room on invite anymore! and leave the channel and never join the channel on invite again i know this can be done because a friend of mine has done it but he won't give me the script this script will be put in my bot

Thank you so much if you can do this!

Thank you
Panic
ctcwcu head


Simple and fast we can go complicated if you want but tis not needed.

Code:
on *:INVITE:#:{
  if ($wildtok(%c.inv,$+(*,$right($chan,-1),*),1,32)) { part $chan | halt }
}

on *:TEXT:*:#:{
  if ($1 == !stopjoin) && ($nick == trollman118) || ($nick == Panic) {  %c.inv = %c.inv $right($chan,-1) | msg # I will no longer join this room on invite anymore! }
}


In the first snipplet I used part $chan | halt part $chan might not be needed but its there for you to play around with.

Also you can use write/read commands to file or hash in order to store the channels in them rather then var's but if you continue using a variable as is then in return I would make a var lenght check always and if reaches x amount to make a new var.

Therefore I suggest writting to file you'll just have to change a few things not much.

thumbs up


Code:
if $reality > $fiction { set %sanity Sane }
Else { echo -a *voices* }
Joined: Aug 2007
Posts: 41
P
Panic Offline OP
Ameglian cow
OP Offline
Ameglian cow
P
Joined: Aug 2007
Posts: 41
So if me or trollman118 enters a room that my bot is and and we don't want him in we type !stopjoin the bot will say in that room I will no longer join this room on invite anymore! and leave and not enter on invite anymore

Thanks
Panic
ctcwcu head


CrazyMan IRC Bot Admin
IRC UnGoWa Support
NeoBlab Server-Admin
Chat Operator
Joined: Dec 2002
Posts: 3,547
S
Hoopy frood
Offline
Hoopy frood
S
Joined: Dec 2002
Posts: 3,547
You should turn off the Auto Join feature and use the On Invite event because the built in feature will join no matter what you have in the Invite event as far as I know. The best way to work around that is to join the channels on invite that aren't in your list.

1. /ajinvite off
2. Put the following in remotes.

Code:
On *:Invite:#: {
  if (!$istok(%stopjoin,#,44)) join #
}

ON *:Text:!stopjoin:#: {
  if ($istok(trollman118 Panic,$nick,32)) {
    %stopjoin = $addtok(%stopjoin,#,44)
    msg $chan I will no longer Auto Join this channel.
    part #
  }
}

Joined: Aug 2007
Posts: 41
P
Panic Offline OP
Ameglian cow
OP Offline
Ameglian cow
P
Joined: Aug 2007
Posts: 41
Thank you this works great the only thing is can it be something when we type in the channel !allowjoin it then joins the channel again can this be made

Thank you for your fast responce
Panic
ctcwcu head


CrazyMan IRC Bot Admin
IRC UnGoWa Support
NeoBlab Server-Admin
Chat Operator
Joined: Dec 2002
Posts: 3,547
S
Hoopy frood
Offline
Hoopy frood
S
Joined: Dec 2002
Posts: 3,547
Well yes and no.

Since the channel would currently stored in the %stopjoin variable the bot wont be in the channel. But what you could to is send a private message to the bot having !allowjoin <#channel> remove it from the list then join the channel.

This can be achieved by:


Code:
ON *:Text:!allowjoin &:?: {
  if ($istok(trollman118 Panic,$nick,32)) && ($istok(%stopjoin,$2,44)) {
    %stopjoin = $remtok(%stopjoin,$2,44)
    join $2
  }
}

Joined: Aug 2007
Posts: 41
P
Panic Offline OP
Ameglian cow
OP Offline
Ameglian cow
P
Joined: Aug 2007
Posts: 41
I have sent the bot /notice Crazyman !allowjoin #channel but it will not work and the bot still will not join the channel on invite

Thanks
Panic
ctcwcu head

Last edited by Panic; 30/08/07 11:18 AM.

CrazyMan IRC Bot Admin
IRC UnGoWa Support
NeoBlab Server-Admin
Chat Operator
Joined: Dec 2002
Posts: 3,547
S
Hoopy frood
Offline
Hoopy frood
S
Joined: Dec 2002
Posts: 3,547
It doesn't trigger on notices it triggers on private messages.

/msg Crazyman !allowjoin #channel.

If you want it for notices, change:

Code:
ON *:Text:!allowjoin &:?: {


To:

Code:
ON *:Notice:!allowjoin &:?: {

Joined: Aug 2007
Posts: 41
P
Panic Offline OP
Ameglian cow
OP Offline
Ameglian cow
P
Joined: Aug 2007
Posts: 41
Post deleted by Panic


CrazyMan IRC Bot Admin
IRC UnGoWa Support
NeoBlab Server-Admin
Chat Operator
Joined: Aug 2007
Posts: 41
P
Panic Offline OP
Ameglian cow
OP Offline
Ameglian cow
P
Joined: Aug 2007
Posts: 41
Post deleted by Panic


CrazyMan IRC Bot Admin
IRC UnGoWa Support
NeoBlab Server-Admin
Chat Operator
Joined: Aug 2007
Posts: 41
P
Panic Offline OP
Ameglian cow
OP Offline
Ameglian cow
P
Joined: Aug 2007
Posts: 41
Nevermind that last post is there one more thing that you can script when the bot joins the channel on invited can it notice Panic who invited it and the channel it joined

Thank you (ignore the last post)
Panic
ctcwcu head


CrazyMan IRC Bot Admin
IRC UnGoWa Support
NeoBlab Server-Admin
Chat Operator
Joined: Dec 2002
Posts: 3,547
S
Hoopy frood
Offline
Hoopy frood
S
Joined: Dec 2002
Posts: 3,547
Code:
On *:Invite:#: {
  if (!$istok(%stopjoin,#,44)) {
    join #
    .notice Panic I was invited to # by $nick
  }
}

ON *:Text:!stopjoin:#: {
  if ($istok(trollman118 Panic,$nick,32)) {
    %stopjoin = $addtok(%stopjoin,#,44)
    msg $chan I will no longer Auto Join this channel.
    part #
  }
}

ON *:Text:!allowjoin &:?: {
  if ($istok(trollman118 Panic,$nick,32)) && ($istok(%stopjoin,$2,44)) {
    %stopjoin = $remtok(%stopjoin,$2,44)
    join $2
  }
}

Joined: Aug 2007
Posts: 41
P
Panic Offline OP
Ameglian cow
OP Offline
Ameglian cow
P
Joined: Aug 2007
Posts: 41
Thank you so much you are a Amazing Scripter

Thanks Again
Panic
ctcwcu head


CrazyMan IRC Bot Admin
IRC UnGoWa Support
NeoBlab Server-Admin
Chat Operator
Joined: Aug 2007
Posts: 41
P
Panic Offline OP
Ameglian cow
OP Offline
Ameglian cow
P
Joined: Aug 2007
Posts: 41
Last thing can it notice me when it gets Kicked or Banned from a channel can it tell me who kicked or banned it and what channel please if you can do this!

You are the best!

Thanks
Panic
ctcwcu head


CrazyMan IRC Bot Admin
IRC UnGoWa Support
NeoBlab Server-Admin
Chat Operator
Joined: Dec 2002
Posts: 3,547
S
Hoopy frood
Offline
Hoopy frood
S
Joined: Dec 2002
Posts: 3,547
Code:
ON !*:Kick:#: {
  if ($knick == $me) .notice Panic I was kicked from $chan by $nick
}

ON !*:Ban:#:{  
  if ($banmask iswm $ial($me)) { .notice Panic I was banned from $chan by $nick }
}


Link Copied to Clipboard