| View previous topic :: View next topic |
| Author |
Message |
BhasIRC Voice
Joined: 02 Jan 2010 Posts: 27 Location: south africa
|
Posted: Tue Feb 02, 2010 3:43 am Post subject: how do i do this |
|
|
Hi Guys...
Its been long hehe i hope you all are having a great new year anyways i would like to know how do i go about making a code that works as follows
1. The user types !list and gets a list of all the channels currently in use that can be viewed o pc using /list
2. Then !channel-name to join a cannel they like expl the channel name is #jmirc they typ !jmirc and it will sajoin them, my bot has the correct flags to access the sajoin.
Thanks in Advance
Zainul |
|
| Back to top |
|
 |
blake Master
Joined: 23 Feb 2009 Posts: 201
|
Posted: Tue Feb 02, 2010 10:13 am Post subject: |
|
|
| Code: | set channels {
"#Opers"
}
bind pub -|- !j j_proc
proc j_proc { nick uhost hand chan arg } {
global channels
set text [lindex [split $arg] 0]
foreach c $channels {
if {!([matchattr $hand mn|mn $chan]) && [string match -nocase $c $chan]} {
return 0
}
}
putserv "SAJOIN $nick :#$text"
}
|
Set the channels you dont want ppl joining otherwise your going to have ppl joining channels they shouldnt be joining
| Code: | set channels {
"#Opers"
}
|
command !j roomname
------------------------------------
| Code: | bind pub -|- !list list_proc
proc list_proc { nick uhost hand chan arg } {
puthelp "PRIVMSG $nick :Room list as follows"
puthelp "PRIVMSG $nick :Add room names here"
} |
_________________ Blake
UKEasyHosting UKStormWatch |
|
| Back to top |
|
 |
|