mIRC Home    About    Download    Register    News    Help

Print Thread
Page 1 of 2 1 2
part script and join script #108351 19/01/05 05:13 AM
Joined: Dec 2004
Posts: 80
C
CyborAccess Offline OP
Babel fish
OP Offline
Babel fish
C
Joined: Dec 2004
Posts: 80
how u make a script that leave a channel when like:
example: !part #blah
and then the bot quit #blah,how u do that? and same thing with the join script,how u make one of those script?...like !join #blah,the bot joins the channel,how? pelase help me


practice makes perfect... smile
Re: part script and join script #108352 19/01/05 05:17 AM
Joined: Aug 2004
Posts: 423
C
clutz1572 Offline
Fjord artisan
Offline
Fjord artisan
C
Joined: Aug 2004
Posts: 423
here's a tip for ya CyborAccess,

try using this sites search feature... i know there is at least two threads on this subject....

Re: part script and join script #108353 19/01/05 05:55 AM
Joined: Nov 2004
Posts: 332
R
ricky_knuckles Offline
Fjord artisan
Offline
Fjord artisan
R
Joined: Nov 2004
Posts: 332
if u look through my script that i pasted
or the bot rather
you should see it
but the hell with it
it goes without saying that you insert a user level if u want one ok
Code:
on *:text:!part:#:{
part $chan
}

on *:text:!part *:*:{
part $$2-
}  

the first one you enter in a channel and the bot parts that channel just !part
the second one you can either enter ina channel or through a msg and you specify the channel you want it to part
i.e. !part #sensei
i trust this will suffice


The Kodokan will move you, one way or another.
Re: part script and join script #108354 19/01/05 05:57 AM
Joined: Nov 2004
Posts: 332
R
ricky_knuckles Offline
Fjord artisan
Offline
Fjord artisan
R
Joined: Nov 2004
Posts: 332
i almost forgot the join
Code:
on *:text:!join *:*:{
join $$2-
}  


The Kodokan will move you, one way or another.
Re: part script and join script #108355 19/01/05 10:44 AM
Joined: Dec 2002
Posts: 3,547
S
SladeKraven Offline
Hoopy frood
Offline
Hoopy frood
S
Joined: Dec 2002
Posts: 3,547
Ricky, it's a bot. I don't think the original poster would actually let that command be triggered when everyone says it. Which I really don't think would be such a grand idea, because you get some idiots who will just flood the bot off with masses of joins.

Cybor: /guser owner Your_Nick 2

Ricky, one slight alteration.
Code:
On owner:Text:!join *:#: {
  if ($ulist($ial($me))) {
    join [color:red]#[/color]$$2-
  }
}

Re: part script and join script #108356 19/01/05 08:07 PM
Joined: Nov 2004
Posts: 332
R
ricky_knuckles Offline
Fjord artisan
Offline
Fjord artisan
R
Joined: Nov 2004
Posts: 332
you realize im just handing him the bare minimum so he can get the idea and carry it himself
but oh well
the # i leave out on mine beacuase i know to type it
althought i would have thought u would need a $+
between # and $$2-
:tongue:
oh yeah why did u make it purely on chan
then if his bot is say on no channels for whatever reason he cant make it join remotely
thats why i use either * or ?
in this case * if it will work

Last edited by ricky_knuckles; 19/01/05 08:09 PM.

The Kodokan will move you, one way or another.
Re: part script and join script #108357 19/01/05 08:20 PM
Joined: Feb 2004
Posts: 2,019
FiberOPtics Offline
Hoopy frood
Offline
Hoopy frood
Joined: Feb 2004
Posts: 2,019
Actually his example works.

Try it out: //tokenize 32 testing | join #$1

Will join #testing. This is an exception though, and doesn't work in other cases, since normally identifiers need to be atleast preceeded by a space in order to evaluated (when not part of another identifier itself that is, or some other exceptions like in popups where you can put a . before an identifier like $iif fex)

Greets


Gone.
Re: part script and join script #108358 19/01/05 08:39 PM
Joined: Nov 2003
Posts: 2,327
T
tidy_trax Offline
Hoopy frood
Offline
Hoopy frood
T
Joined: Nov 2003
Posts: 2,327
This a general reply, i'm just replying to Slade because his is the post I was reading before making this reply smile

It might be a good idea to add a check to make sure they don't try and make you join 0 (/join 0, /join 00, /join 000, etc), which is the equivalent of /partall.

Code:
on *:text:!join *:#:{
  var %a, %b = $regsub($$2,/(?<=^|\x2C)0+(?=\x2C|$)/g,,%a)
  join %a
}


New username: hixxy
Re: part script and join script #108359 19/01/05 08:40 PM
Joined: Dec 2002
Posts: 3,547
S
SladeKraven Offline
Hoopy frood
Offline
Hoopy frood
S
Joined: Dec 2002
Posts: 3,547
Indeed. Good point. smile

Re: part script and join script #108360 19/01/05 08:47 PM
Joined: Dec 2002
Posts: 3,547
S
SladeKraven Offline
Hoopy frood
Offline
Hoopy frood
S
Joined: Dec 2002
Posts: 3,547
Is there anything you don't moan about? You moan about everything in every little detail.

Quote:

oh yeah why did u make it purely on chan
then if his bot is say on no channels for whatever reason he cant make it join remotely
thats why i use either * or ?
in this case * if it will work


Go ahead dude, add the stupid asterisk.

Re: part script and join script #108361 19/01/05 09:04 PM
Joined: Feb 2004
Posts: 2,019
FiberOPtics Offline
Hoopy frood
Offline
Hoopy frood
Joined: Feb 2004
Posts: 2,019
That's a good idea, but it could be improved a bit, since right now it doesn't work if you use spaces like:

#one , 000 , #two

I figured, we could as well replace any occurences of a channel specified without its prefix #, since that would give an error to join. This will catch the 0's as well, all in one.

The good thing is that it does give support for channel keys:

var %a, %b = $regsub($2-,/(?<=^|\x2C)\s?[^#]+/g,,%a)

On the test string: bla #one test, #two , 00 ,test #three four
it gave: #one test,#two ,#three four

I'm sure the regex can be improved, though I gotta go, going to the movies :tongue:

Greets


Gone.
Re: part script and join script #108362 19/01/05 09:41 PM
Joined: Nov 2004
Posts: 332
R
ricky_knuckles Offline
Fjord artisan
Offline
Fjord artisan
R
Joined: Nov 2004
Posts: 332
there you go breaking the regex out confused


The Kodokan will move you, one way or another.
Re: part script and join script #108363 19/01/05 09:44 PM
Joined: Nov 2004
Posts: 332
R
ricky_knuckles Offline
Fjord artisan
Offline
Fjord artisan
R
Joined: Nov 2004
Posts: 332
did you not just gripe at me about having the #$$2-
yeah sit down


The Kodokan will move you, one way or another.
Re: part script and join script #108364 19/01/05 11:02 PM
Joined: Aug 2003
Posts: 1,831
I
Iori Offline
Hoopy frood
Offline
Hoopy frood
I
Joined: Aug 2003
Posts: 1,831
If you try and /join #one , 000 , #two all that will happen is you join #one. smile
/join doesn't accept spaces between channel names.

Re: part script and join script #108365 19/01/05 11:39 PM
Joined: Feb 2004
Posts: 2,019
FiberOPtics Offline
Hoopy frood
Offline
Hoopy frood
Joined: Feb 2004
Posts: 2,019
Interesting.

I'm honestly surprised, because the comma's are the delimiter, it seems weird why spaces would matter, since they can't be part of a channel name.

Oh well, the regex still works, but its merit is reduced to simply removing 0's and channel names without the # prefix.

Greets


Gone.
Re: part script and join script #108366 19/01/05 11:45 PM
Joined: Aug 2003
Posts: 1,831
I
Iori Offline
Hoopy frood
Offline
Hoopy frood
I
Joined: Aug 2003
Posts: 1,831
Comma between channelnames and between keys, space between channels and keys
join #channel key
join #chan1,#chan2 key1,key2

Oh and don't forget $chantypes is not always only # smile

Re: part script and join script #108367 19/01/05 11:49 PM
Joined: Feb 2004
Posts: 2,019
FiberOPtics Offline
Hoopy frood
Offline
Hoopy frood
Joined: Feb 2004
Posts: 2,019
What would this join: join #chan1,#chan2 key1,key2 ?

chan1 with key1 and chan2 with key2...never knew that, always thought it was:

chan key, chan key, chan key

Heh, you might be surprised I don't know this stuff, but I rarely chat, I use mIRC mainly to script laugh

Well then the regex I posted should be discarded, since it was created with incomplete knowledge about joining channels.

Greets

Last edited by FiberOPtics; 19/01/05 11:53 PM.

Gone.
Re: part script and join script #108368 19/01/05 11:53 PM
Joined: Dec 2002
Posts: 3,547
S
SladeKraven Offline
Hoopy frood
Offline
Hoopy frood
S
Joined: Dec 2002
Posts: 3,547
Why does this sound like Deja Vu Fiber? It sounds like this was said the exact same time yesterday. :tongue:

Re: part script and join script #108369 19/01/05 11:55 PM
Joined: Feb 2004
Posts: 2,019
FiberOPtics Offline
Hoopy frood
Offline
Hoopy frood
Joined: Feb 2004
Posts: 2,019
I went to bed at 11 pm yesterday, that was 2 hours before now, so I don't know what and where something about joining channels was said exactly at this time.

Eh?


Gone.
Re: part script and join script #108370 20/01/05 12:00 AM
Joined: Dec 2002
Posts: 3,547
S
SladeKraven Offline
Hoopy frood
Offline
Hoopy frood
S
Joined: Dec 2002
Posts: 3,547
Sorry, in regards with:

Quote:

Heh, you might be surprised I don't know this stuff, but I rarely chat, I use mIRC mainly to script


grin

Page 1 of 2 1 2